|
5 | 5 | from importlib import import_module |
6 | 6 | from django.apps import apps |
7 | 7 | from django.apps.config import MODELS_MODULE_NAME |
8 | | - from django.conf import settings |
9 | | - from django.core.exceptions import ImproperlyConfigured, AppRegistryNotReady |
| 8 | + from django.core.exceptions import AppRegistryNotReady |
10 | 9 | from django import forms |
11 | 10 |
|
12 | | - # from oscar.core.compat |
13 | | - # A setting that can be used in foreign key declarations |
14 | | - AUTH_USER_MODEL = getattr(settings, 'AUTH_USER_MODEL', 'auth.User') |
15 | | - try: |
16 | | - AUTH_USER_APP_LABEL, AUTH_USER_MODEL_NAME = AUTH_USER_MODEL.rsplit('.', 1) |
17 | | - except ValueError: |
18 | | - raise ImproperlyConfigured("AUTH_USER_MODEL must be of the form" |
19 | | - " 'app_label.model_name'") |
20 | | - |
21 | 11 | # from oscar.core.loading |
22 | 12 | def get_model(app_label, model_name): |
23 | 13 | """ |
@@ -88,7 +78,6 @@ def post_process_urls(self, urlpatterns): |
88 | 78 | else: # oscar is installed, use it. |
89 | 79 | from oscar.apps.payment.exceptions import UnableToTakePayment |
90 | 80 | from oscar.core.application import Application |
91 | | - from oscar.core.compat import AUTH_USER_MODEL |
92 | 81 | from oscar.core.loading import get_model, is_model_registered |
93 | 82 | from oscar.forms.widgets import DatePickerInput |
94 | 83 | from oscar.templatetags.currency_filters import currency |
|
0 commit comments