On Dec 13, 2007 10:46 PM, Julien <[EMAIL PROTECTED]> wrote: > But it still doesn't work. To make it work I have to do the whole: > from myproject.myapp.models import Bla > > Not very reusable approach...
While it works well for the tutorial, where keeping all the code in one place reduces the number of things which need to be explained, deploying a real-world project with all of its applications and associated code inside a single project directory is usually a bad idea. Place the application modules directly on your Python path so that they only need to "know" about their own names -- e.g., you can do imports "from appname.models" instead of "from projectname.appname.models". That'll be pretty much necessary for django-registration, because it assumes it's been placed directly on the Python path, and so imports like "from registration.models import RegistrationProfile" will work. -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---