Created
April 21, 2019 05:50
-
-
Save ivan-vilches/53f1e9fa27c59d836b807573fe8ef5b9 to your computer and use it in GitHub Desktop.
indented
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib import admin | |
from .models import Post | |
@admin.register(Post) | |
class PostAdmin(admin.ModelAdmin): | |
list_display = ('title', 'slug', 'author', 'publish', | |
'status') | |
list_filter = ('status', 'created', 'publish', 'author') | |
search_fields = ('title', 'body') | |
prepopulated_fields = {'slug': ('title',)} | |
raw_id_fields = ('author',) | |
date_hierarchy = 'publish' | |
ordering = ('status', 'publish') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment