On Thursday 02 April 2015 05:50:04 Curtis Maloney wrote:
> Does your model inherit from PermissionsMixin?
>
> If you're using Admin, or any of Django's permissions machinery, you will
> need django.contrib.auth in there to use the Group and Permission models.
>
The problem is not with permissions; the problem is that you can't import
AbstractBaseUser without importing the concrete Permission, Group and User
models, because they're all in the same module.
> On 2 April 2015 at 13:47, Dan Watson wrote:
>>
>> /Users/dcwatson/Documents/Environments/reader/lib/python3.4/site-
packages/django/contrib/auth/models.py:41:
>> RemovedInDjango19Warning: Model class django.contrib.auth.models.Permission
>> 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 Permission(models.Model):
>>
>> Same thing for User and Group.
I am not sure what the proper fix should be; on one hand, you are using code
from django.contib.auth, so it makes some sense to require it to be installed.
On the other hand, that forces two redundant tables on you (Group and
Permission are not swappable).
Please do open a ticket -- my instinct is that django.contrib.auth will need
to be installed, but the impact of installing it should be minimised.
Shai.