generated from westfarn/web_django_template
12 lines
339 B
Python
12 lines
339 B
Python
from django.contrib import admin
|
|
|
|
from blog.models import Post
|
|
|
|
|
|
@admin.register(Post)
|
|
class PostAdmin(admin.ModelAdmin):
|
|
list_display = ("title", "is_published", "published_at", "author", "updated_at")
|
|
list_filter = ("is_published",)
|
|
prepopulated_fields = {"slug": ("title",)}
|
|
search_fields = ("title", "excerpt", "body")
|