Carl, thanks. You were right - I was experiencing "b".

Thanks again
Mike

On Tuesday, 5 January 2016 11:02:24 UTC-5, Carl Meyer wrote:
>
> Hi Stodge, 
>
> On 01/05/2016 08:57 AM, Stodge wrote: 
> > I'm using Django 1.6.9. When the dev server (and hence Apache) starts, 
> > is Django supposed to import models for apps that exist on disk, but 
> > aren't enabled in the settings? I'm seeing this behaviour and I wasn't 
> > expecting it. Thanks 
>
> Django shouldn't do that on its own. AFAIK the only reason a models file 
> should be imported is a) because it's listed in INSTALLED_APPS, or b) 
> because something else that is imported imports it (possibly also c) an 
> installed model has an FK linking to it with a string reference?). 
>
> My first guess would be that you're seeing case (b). If you just add an 
> "assert False" at module-level in the models file in question, the 
> resulting traceback should show you the import chain leading to its 
> import. 
>
> Carl 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a33e827f-59f6-4836-8713-d23ae6a3e6e9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to