diff options
| author | Paolo Melchiorre <paolo@melchiorre.org> | 2022-12-25 17:04:59 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-25 10:04:59 -0600 |
| commit | a59d6f55baca966cee3b6f31416fe8e6c42721ad (patch) | |
| tree | 5558c10922be8a921dbcb46e47b4dd374724df08 /blog | |
| parent | 5b58b15c2113a28c2edc452ad6d04c8915acf148 (diff) | |
Fixed #1293 -- Modernize to Django 3.2/Python 3.8 (#1294)
Diffstat (limited to 'blog')
| -rw-r--r-- | blog/admin.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/blog/admin.py b/blog/admin.py index 5525017a..3a84c38d 100644 --- a/blog/admin.py +++ b/blog/admin.py @@ -3,6 +3,7 @@ from django.contrib import admin from .models import Entry, Event +@admin.register(Entry) class EntryAdmin(admin.ModelAdmin): list_display = ("headline", "pub_date", "is_active", "is_published", "author") list_filter = ("is_active",) @@ -21,6 +22,7 @@ class EntryAdmin(admin.ModelAdmin): return formfield +@admin.register(Event) class EventAdmin(admin.ModelAdmin): list_display = ( "headline", @@ -32,7 +34,3 @@ class EventAdmin(admin.ModelAdmin): "is_published", ) list_filter = ("is_active",) - - -admin.site.register(Entry, EntryAdmin) -admin.site.register(Event, EventAdmin) |
