Created
April 21, 2019 06:00
-
-
Save ivan-vilches/5cdc17b34d48e2e180190208d821c110 to your computer and use it in GitHub Desktop.
indendent
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