views:

85

answers:

1

Hello,

i have two Django apps in my Project, call them App1 and App2. App1 is the "Home"-application that displays a text to introduce users and shows some news. App2 is a "Content"-app to display pages that only consist of a title and some html retrieved from the DB. I want App1 to display it's text using the model from App2. I can do this by using

from mysite.content.models import Content

and it works. But if I transfer my apps to another site, I would have to change that mysite to the name of the other site. Can this be done without supplying the name of the site?

TIA :)

+3  A: 

mysite is just a directory name on the Python path, not a hostname.

Give it a name that has meaning for your project and give the application directories names that have meaning for the applications.

If you do this then you don't need to rename it if you move to another site. All you need to do is make sure your directory is on the Python path at the new site.

Van Gale