Skip to content

Commit 376238b

Browse files
committed
[#2076] Upgrade django-admin-index and django-ordered-model
1 parent 562c0e2 commit 376238b

File tree

8 files changed

+33
-13
lines changed

8 files changed

+33
-13
lines changed

requirements/base.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ diff-match-patch==20200713
8080
django==3.2.23
8181
# via
8282
# -r requirements/base.in
83+
# django-admin-index
8384
# django-appconf
8485
# django-appdata
8586
# django-axes
@@ -124,7 +125,7 @@ django==3.2.23
124125
# mozilla-django-oidc-db
125126
# notifications-api-common
126127
# zgw-consumers
127-
django-admin-index==1.5.0
128+
django-admin-index==3.1.0
128129
# via -r requirements/base.in
129130
django-appconf==1.0.5
130131
# via
@@ -200,7 +201,7 @@ django-log-outgoing-requests==0.6.0
200201
# via -r requirements/base.in
201202
django-open-forms-client==0.2.3
202203
# via -r requirements/base.in
203-
django-ordered-model==3.4.3
204+
django-ordered-model==3.7.4
204205
# via
205206
# -r requirements/base.in
206207
# django-admin-index

requirements/ci.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ django==3.2.23
152152
# via
153153
# -c requirements/base.txt
154154
# -r requirements/base.txt
155+
# django-admin-index
155156
# django-appconf
156157
# django-appdata
157158
# django-axes
@@ -196,7 +197,7 @@ django==3.2.23
196197
# mozilla-django-oidc-db
197198
# notifications-api-common
198199
# zgw-consumers
199-
django-admin-index==1.5.0
200+
django-admin-index==3.1.0
200201
# via
201202
# -c requirements/base.txt
202203
# -r requirements/base.txt
@@ -330,7 +331,7 @@ django-open-forms-client==0.2.3
330331
# via
331332
# -c requirements/base.txt
332333
# -r requirements/base.txt
333-
django-ordered-model==3.4.3
334+
django-ordered-model==3.7.4
334335
# via
335336
# -c requirements/base.txt
336337
# -r requirements/base.txt

requirements/dev.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ django==3.2.23
185185
# -c requirements/ci.txt
186186
# -r requirements/ci.txt
187187
# ddt-api-calls
188+
# django-admin-index
188189
# django-appconf
189190
# django-appdata
190191
# django-axes
@@ -231,7 +232,7 @@ django==3.2.23
231232
# mozilla-django-oidc-db
232233
# notifications-api-common
233234
# zgw-consumers
234-
django-admin-index==1.5.0
235+
django-admin-index==3.1.0
235236
# via
236237
# -c requirements/ci.txt
237238
# -r requirements/ci.txt
@@ -369,7 +370,7 @@ django-open-forms-client==0.2.3
369370
# via
370371
# -c requirements/ci.txt
371372
# -r requirements/ci.txt
372-
django-ordered-model==3.4.3
373+
django-ordered-model==3.7.4
373374
# via
374375
# -c requirements/ci.txt
375376
# -r requirements/ci.txt

src/open_inwoner/conf/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,7 @@
818818
TWO_FACTOR_WEBAUTHN_AUTHENTICATOR_ATTACHMENT = "cross-platform"
819819
# Allow OIDC admins to bypass 2FA
820820
MAYKIN_2FA_ALLOW_MFA_BYPASS_BACKENDS = [
821-
"open_inwoner.accounts.backends.CustomOIDCBackend",
821+
# "open_inwoner.accounts.backends.CustomOIDCBackend",
822822
]
823823

824824
# file upload limits
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Generated by Django 3.2.23 on 2024-02-07 15:19
2+
3+
from django.db import migrations
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
("configurations", "0058_siteconfiguration_recipients_email_digest"),
10+
]
11+
12+
operations = [
13+
migrations.AlterModelOptions(
14+
name="siteconfigurationpage",
15+
options={
16+
"ordering": ("order",),
17+
"verbose_name": "Flatpage in the footer",
18+
"verbose_name_plural": "Flatpages in the footer",
19+
},
20+
),
21+
]

src/open_inwoner/configurations/models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ class SiteConfigurationPage(OrderedModel):
611611

612612
objects = OrderedModelManager()
613613

614-
class Meta:
614+
class Meta(OrderedModel.Meta):
615615
verbose_name = _("Flatpage in the footer")
616616
verbose_name_plural = _("Flatpages in the footer")
617617

src/open_inwoner/pdc/models/product.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ class ProductCondition(OrderedModel):
414414
help_text=_("Rule for the automated check"),
415415
)
416416

417-
class Meta:
417+
class Meta(OrderedModel.Meta):
418418
verbose_name = _("Condition")
419419
verbose_name_plural = _("Conditions")
420420
ordering = ("order",)

src/open_inwoner/utils/django_two_factor_auth.py

-4
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,4 @@
66
def should_display_dropdown_menu(request) -> bool:
77
default = default_should_display_dropdown_menu(request)
88

9-
# never display the dropdown in two-factor admin views
10-
if request.resolver_match.view_name.startswith("maykin_2fa"):
11-
return False
12-
139
return default and request.user.is_verified()

0 commit comments

Comments
 (0)