On 4/10/06, Fawad Halim <[EMAIL PROTECTED]> wrote:
>
> In db/models/base.py, there is a check that goes like
>
> if re.sub('\.models$', '', mod) not in settings.INSTALLED_APPS:
>
> That kinda indicates that the models module name should end in .models.
>
> Regards
> -fawad
>
Per python (oversimplified) basics: if python finds the dir models/
which contains an __init__.py, then all files in that dir will be
imported regardless of name (they just need to be python files i.e.:
*.py). However, of python instead finds the file 'models.py', that
will be imported. Seeing models.py is importing but models/somefile.py
does not, that makes me think you are missing the __init__.py file in
your models/ dir.

Actually, I see quite a bit of confusion on this list over how python
imports. A better explaination than I could give can be found here:
http://diveintopython.org/xml_processing/packages.html

--
----
Waylan Limberg
[EMAIL PROTECTED]

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