In stable/1.7.x, I'm getting a lot of these warnings:

venv/src/django/django/contrib/sites/models.py:65: 
RemovedInDjango19Warning: Model class django.contrib.sites.models.Site 
doesn't declare an explicit app_label and either isn't in an application in 
INSTALLED_APPS or else was imported before its application was loaded. This 
will no longer be supported in Django 1.9.
  class Site(models.Model):

This is usually because somewhere in one of my modules I am importing a 
models.py at the top of the module, and that module is needed by something 
else down the import chain. Is there any reason why this check can't be 
done *after* all apps are loaded?  If not, can't we just "lazy load" the 
model, and then run the explicit app_label check after all apps are loaded? 
It's a huge pain to have to constantly track down the import causing the 
warning. It make me never want to import a models.py file anywhere other 
than inside a function (which is bad).

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/476d7e36-ab40-4d06-8123-35e899e22c6f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to