df_site 0.1.0__py3-none-any.whl → 0.1.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- df_site/admin.py +20 -8
- {df_site-0.1.0.dist-info → df_site-0.1.1.dist-info}/METADATA +3 -3
- {df_site-0.1.0.dist-info → df_site-0.1.1.dist-info}/RECORD +6 -6
- {df_site-0.1.0.dist-info → df_site-0.1.1.dist-info}/LICENSE +0 -0
- {df_site-0.1.0.dist-info → df_site-0.1.1.dist-info}/WHEEL +0 -0
- {df_site-0.1.0.dist-info → df_site-0.1.1.dist-info}/entry_points.txt +0 -0
df_site/admin.py
CHANGED
@@ -2,10 +2,22 @@
|
|
2
2
|
|
3
3
|
from functools import cached_property
|
4
4
|
|
5
|
-
|
6
|
-
from allauth.
|
7
|
-
|
8
|
-
|
5
|
+
try:
|
6
|
+
from allauth.account.models import EmailAddress
|
7
|
+
except ImportError:
|
8
|
+
EmailAddress = None
|
9
|
+
try:
|
10
|
+
from allauth.mfa.models import Authenticator
|
11
|
+
except ImportError:
|
12
|
+
Authenticator = None
|
13
|
+
try:
|
14
|
+
from allauth.socialaccount.models import SocialAccount
|
15
|
+
except ImportError:
|
16
|
+
SocialAccount = None
|
17
|
+
try:
|
18
|
+
from allauth.usersessions.models import UserSession
|
19
|
+
except ImportError:
|
20
|
+
UserSession = None
|
9
21
|
from django.conf import settings
|
10
22
|
from django.contrib import admin
|
11
23
|
from django.contrib.auth.admin import UserAdmin
|
@@ -111,13 +123,13 @@ class PreferencesUserAdmin(UserAdmin):
|
|
111
123
|
def excluded_inlines(self):
|
112
124
|
"""Exclude inlines of which the corresponding app is not installed."""
|
113
125
|
excluded = []
|
114
|
-
if "allauth.mfa" not in settings.INSTALLED_APPS:
|
126
|
+
if "allauth.mfa" not in settings.INSTALLED_APPS or Authenticator is None:
|
115
127
|
excluded.append(AuthenticatorInline)
|
116
|
-
if "allauth.socialaccount" not in settings.INSTALLED_APPS:
|
128
|
+
if "allauth.socialaccount" not in settings.INSTALLED_APPS or SocialAccount is None:
|
117
129
|
excluded.append(SocialAccountInline)
|
118
|
-
if "allauth.usersessions" not in settings.INSTALLED_APPS:
|
130
|
+
if "allauth.usersessions" not in settings.INSTALLED_APPS or UserSession is None:
|
119
131
|
excluded.append(UserSessionInline)
|
120
|
-
if "allauth.account" not in settings.INSTALLED_APPS:
|
132
|
+
if "allauth.account" not in settings.INSTALLED_APPS or EmailAddress is None:
|
121
133
|
excluded.append(EmailAddressInline)
|
122
134
|
return excluded
|
123
135
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: df_site
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.1
|
4
4
|
Summary: More batteries to Django
|
5
5
|
Home-page: https://github.com/d9pouces/df_site
|
6
6
|
License: CECILL-B
|
@@ -28,7 +28,7 @@ Classifier: Programming Language :: Python :: 3.13
|
|
28
28
|
Requires-Dist: df-config (>=1.2.42)
|
29
29
|
Requires-Dist: df-websockets (>=1.0.9,<2.0.0)
|
30
30
|
Requires-Dist: django (>=5.0)
|
31
|
-
Requires-Dist: django-allauth[mfa,socialaccount] (>=
|
31
|
+
Requires-Dist: django-allauth[mfa,socialaccount] (>=65.1.0,<66.0.0)
|
32
32
|
Requires-Dist: django-bootstrap5 (>=23.3)
|
33
33
|
Requires-Dist: django-ckeditor-5 (>=0.2.13,<0.3.0)
|
34
34
|
Requires-Dist: django-cookie-consent (>=0.6.0,<0.7.0)
|
@@ -44,7 +44,7 @@ Requires-Dist: django-redis-sessions (>=0.6.2,<0.7.0)
|
|
44
44
|
Requires-Dist: django-tinymce (>=4.1.0,<5.0.0)
|
45
45
|
Requires-Dist: fido2 (>=1.1.3,<2.0.0)
|
46
46
|
Requires-Dist: jsmin (>=3.0.1,<4.0.0)
|
47
|
-
Requires-Dist: lxml-html-clean (>=0.
|
47
|
+
Requires-Dist: lxml-html-clean (>=0.3.1,<0.4.0)
|
48
48
|
Requires-Dist: nh3 (>=0.2.18,<0.3.0)
|
49
49
|
Requires-Dist: psycopg (>=3.2.1,<4.0.0)
|
50
50
|
Requires-Dist: redis (>=5.0.1,<6.0.0)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
df_site/__init__.py,sha256=19530RKoMrhQT8Unm5P5MhvNko5-VxDviUCnc99_-LE,48
|
2
2
|
df_site/__main__.py,sha256=S5LgcXMb2UojfnLpSLcmtMrzdYbnXvSLZjE8sdrYuWg,1139
|
3
|
-
df_site/admin.py,sha256=
|
3
|
+
df_site/admin.py,sha256=3svTlrz9ywMdJF4f22SN9Q9GxHOoemkU9kxVwmabiLA,4605
|
4
4
|
df_site/apps.py,sha256=Tine1DCyYcPQiwEeFAVc7Zqln8TuCrxRtE3z0jOv6z8,1729
|
5
5
|
df_site/components/__init__.py,sha256=9yK4-UT8B2dt2e4PUiGYJxqO2VsDLaiueEodKsIBxYw,47
|
6
6
|
df_site/components/base.py,sha256=gIMFcwQTGaM2rJNSeV-fLKVEiA4IP4_qlJf8aR2bWp8,2871
|
@@ -302,8 +302,8 @@ df_site/users/notifications.py,sha256=jAUrHxreW-Nsam3AM8N3vPt45LOS2J2mMR_t3Dbv6I
|
|
302
302
|
df_site/users/urls.py,sha256=f5A2oMTV3dQGfsTRZs6YRD5jVDIqPZPZALIB0sjOkM0,515
|
303
303
|
df_site/users/views.py,sha256=uMMgXe4J-YChpYavTReos_MuNfLaz1fjmPq3oD36mLw,2770
|
304
304
|
df_site/views.py,sha256=DYe0iyIL7xTrdZKiXjaFnubmtUXJnhKccx8QaMcN_0o,4525
|
305
|
-
df_site-0.1.
|
306
|
-
df_site-0.1.
|
307
|
-
df_site-0.1.
|
308
|
-
df_site-0.1.
|
309
|
-
df_site-0.1.
|
305
|
+
df_site-0.1.1.dist-info/LICENSE,sha256=H1HcYtCa2qQNIP1AnRy8KUQRjHqfoDN4MoJHKIt_w6g,22399
|
306
|
+
df_site-0.1.1.dist-info/METADATA,sha256=vdVAPxFZLNmQlmY2i-Wmbfrop59Q8ZHl6a4fejN6yGI,9834
|
307
|
+
df_site-0.1.1.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
|
308
|
+
df_site-0.1.1.dist-info/entry_points.txt,sha256=QBlDeF1v1FepN-bJk7FuhWtgm7Y7-dhBK6673t94_7k,59
|
309
|
+
df_site-0.1.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|