Malcolm Tredinnick wrote:
> You also need to have the model in the __all__ export of
> models/__init__.py, otherwise it doesn't get imported into the
> appropriate namespace as part of "import myapp.models".

Well, adding the model modules to __all__ doesn't work either (isn't
this for when you do from myapp.models import * ?).  However, you are
correct about importing the modules into the namespace of myapp.models.
 If I put "import mymodels1, mymodels2" in myapp/models/__init__.py,
then things work as planned.

> Admittedly, it's hackish, but it is workable if you want to structure
> your directories this way.

Yes, documentation would be nice :-)


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to