remove custom manager on user
This commit is contained in:
parent
1e4251c796
commit
38e2b5e858
@ -2,14 +2,6 @@ from django.contrib.auth.models import AbstractUser
|
|||||||
from django.db import models
|
from django.db import models
|
||||||
|
|
||||||
|
|
||||||
class UserQuerySet(models.QuerySet):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class UserManager(models.Manager.from_queryset(UserQuerySet)):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class CustomUser(AbstractUser):
|
class CustomUser(AbstractUser):
|
||||||
"""Custom User model to store CAS attributes from PolyLAN."""
|
"""Custom User model to store CAS attributes from PolyLAN."""
|
||||||
|
|
||||||
@ -22,11 +14,6 @@ class CustomUser(AbstractUser):
|
|||||||
# Additional fields that might come from CAS
|
# Additional fields that might come from CAS
|
||||||
cas_attributes = models.JSONField(default=dict, blank=True)
|
cas_attributes = models.JSONField(default=dict, blank=True)
|
||||||
|
|
||||||
objects = UserManager()
|
|
||||||
|
|
||||||
class Meta:
|
|
||||||
_base_manager_name = "objects"
|
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return f"{self.username} ({self.cas_user_id})"
|
return f"{self.username} ({self.cas_user_id})"
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user