model - Django - how to let one application reference another -


I have two Django apps in my project, called App 1 and App2. App1 is "Home" - the device that shows the text to present users and shows some news, Ep 2 is to display a "content" -pip, which contains only a title and some HTML derived from DB. I want to show App1 to App1 using models from App2 and I can import content from

  mysite.content.models  

and Does it work. But if I move my application to another site, then I have to change that site to the name of another site. Can this be done without the supply of the name of the site?

TIA :)

mysite on python path only Is a directory name, not a hostname.

Give it a name which means that your project means and give the application directory name, which means the applications are

If you do this, you do not have to rename it. If you go to another site, you only need to make sure that your directory is on the new site on the Python Path.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -