Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions django/utils/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
# or later". So that third-party apps can use these values, each constant
# should remain as long as the oldest supported Django version supports that
# Python version.
PY38 = sys.version_info >= (3, 8)
PY39 = sys.version_info >= (3, 9)
PY310 = sys.version_info >= (3, 10)
PY311 = sys.version_info >= (3, 11)
PY312 = sys.version_info >= (3, 12)
Expand Down
5 changes: 3 additions & 2 deletions tests/admin_views/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ def get_queryset(self, request):
return super().get_queryset(request).order_by("age")


class ParentWithUUIDPKAdmin(admin.ModelAdmin):
class ParentWithUUIDPKNoAddAdmin(admin.ModelAdmin):
list_display = ("id", "title")
list_editable = ("title",)

Expand Down Expand Up @@ -1294,7 +1294,7 @@ class CourseAdmin(admin.ModelAdmin):
site.register(InlineReferer, InlineRefererAdmin)
site.register(ReferencedByGenRel)
site.register(GenRelReference)
site.register(ParentWithUUIDPK, ParentWithUUIDPKAdmin)
site.register(ParentWithUUIDPK)
site.register(RelatedPrepopulated, search_fields=["name"])
site.register(RelatedWithUUIDPKModel)
site.register(ReadOnlyRelatedField, ReadOnlyRelatedFieldAdmin)
Expand Down Expand Up @@ -1373,6 +1373,7 @@ class CourseAdmin(admin.ModelAdmin):
site7 = admin.AdminSite(name="admin7")
site7.register(Article, ArticleAdmin2)
site7.register(Section)
site7.register(ParentWithUUIDPK, ParentWithUUIDPKNoAddAdmin)


# Admin for testing optgroup in popup response
Expand Down
2 changes: 1 addition & 1 deletion tests/admin_views/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -4742,7 +4742,7 @@ def test_forged_post_submission_when_no_add_permission(self):
"_save": "Save",
}
# This model admin allows no add permissions.
changelist_url = reverse("admin:admin_views_parentwithuuidpk_changelist")
changelist_url = reverse("admin7:admin_views_parentwithuuidpk_changelist")
response = self.client.post(changelist_url, data)
self.assertEqual(response.status_code, HTTPStatus.BAD_REQUEST)
self.assertEqual(ParentWithUUIDPK.objects.count(), before_count)
Expand Down
Loading