mirror of
https://github.com/jazzband/django-auditlog.git
synced 2026-03-16 22:20:26 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
ad675a0df1
commit
526da4e990
2 changed files with 3 additions and 4 deletions
|
|
@ -1 +0,0 @@
|
|||
default_app_config = "demo.apps.DemoConfig"
|
||||
|
|
@ -3,6 +3,7 @@ from django.contrib import admin
|
|||
from .models import Category, Post, Tag
|
||||
|
||||
|
||||
@admin.register(Post)
|
||||
class PostAdmin(admin.ModelAdmin):
|
||||
list_display = ("title", "author", "category", "created_at", "updated_at")
|
||||
list_filter = ("author", "category", "tags", "created_at")
|
||||
|
|
@ -22,16 +23,15 @@ class PostAdmin(admin.ModelAdmin):
|
|||
readonly_fields = ("created_at", "updated_at")
|
||||
|
||||
|
||||
@admin.register(Category)
|
||||
class CategoryAdmin(admin.ModelAdmin):
|
||||
list_display = ("name",)
|
||||
search_fields = ("name",)
|
||||
|
||||
|
||||
@admin.register(Tag)
|
||||
class TagAdmin(admin.ModelAdmin):
|
||||
list_display = ("name",)
|
||||
search_fields = ("name",)
|
||||
|
||||
|
||||
admin.site.register(Post, PostAdmin)
|
||||
admin.site.register(Category, CategoryAdmin)
|
||||
admin.site.register(Tag, TagAdmin)
|
||||
|
|
|
|||
Loading…
Reference in a new issue