Whoops, make our new UserManager extend the Django core one, since it turns out it's absolutely mandatory
This commit is contained in:
parent
70703c5ceb
commit
9befd27a26
2 changed files with 24 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
|||
from django.db import models
|
||||
from django.contrib.auth.models import AbstractUser
|
||||
from django.contrib.auth.models import AbstractUser, UserManager as DjangoUserManager
|
||||
from django.contrib.sites.models import Site as DjangoSite
|
||||
from django.utils.functional import cached_property
|
||||
from meta.models import ModelMeta
|
||||
|
|
@ -31,7 +31,7 @@ class Site(models.Model):
|
|||
ordering = ('name',)
|
||||
|
||||
|
||||
class UserManager(models.Manager):
|
||||
class UserManager(DjangoUserManager):
|
||||
def get_queryset(self):
|
||||
return super(UserManager, self).get_queryset().prefetch_related('keys', 'profiles')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue