Should a warning be raised for abstract models with no app_label?

63 views
Skip to first unread message

Greg Brown

unread,
Oct 5, 2014, 4:48:51 PM10/5/14
to django-d...@googlegroups.com
See discussion here: https://code.djangoproject.com/ticket/21794

To summarise, when an abstract model class has no app_label, Django currently says:

    RemovedInDjango19Warning: Model class [model] 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.

However, if I add app_label = None to the abstract model, Django thinks all inheriting models are in an app labelled None. I think the solution is simply to silence the warning. I'm happy to submit a pull request if the core devs agree.

Cheers,
Greg

Reply all
Reply to author
Forward
0 new messages