0001-custom_user-remove-old-import-compatibility-code-699.patch
src/authentic2/custom_user/models.py | ||
---|---|---|
20 | 20 |
import os |
21 | 21 |
import uuid |
22 | 22 | |
23 |
from django.contrib.auth.models import AbstractBaseUser |
|
24 |
from django.contrib.contenttypes.fields import GenericRelation |
|
25 |
from django.contrib.postgres.fields import JSONField |
|
23 | 26 |
from django.core.exceptions import MultipleObjectsReturned, ValidationError |
24 | 27 |
from django.core.mail import send_mail |
25 | 28 |
from django.db import models, transaction |
... | ... | |
27 | 30 |
from django.utils import timezone |
28 | 31 |
from django.utils.translation import gettext_lazy as _ |
29 | 32 | |
30 |
try: |
|
31 |
from django.contrib.contenttypes.fields import GenericRelation |
|
32 |
except ImportError: |
|
33 |
from django.contrib.contenttypes.generic import GenericRelation |
|
34 | ||
35 |
from django.contrib.auth.models import AbstractBaseUser |
|
36 |
from django.contrib.postgres.fields import JSONField |
|
37 | ||
38 | 33 |
from authentic2 import app_settings |
39 | 34 |
from authentic2.a2_rbac.models import RoleParenting |
40 | 35 |
from authentic2.decorators import errorcollector |
41 |
- |