Removed title and slug field from blogpost model and db

This commit is contained in:
2016-02-25 09:37:03 +01:00
parent 5b033803a8
commit 62ec42297d
9 changed files with 14 additions and 43 deletions

View File

@@ -23,19 +23,15 @@ from django.contrib import admin
class PostAdmin(admin.ModelAdmin):
# fields display on change list
list_display = ['title']
list_display = ['content']
# fields to filter the change list with
list_filter = ['published', 'created']
# fields to search in change list
search_fields = ['title', 'content']
search_fields = ['content']
# enable the date drill down on change list
date_hierarchy = 'created'
# enable the save buttons on top on change form
save_on_top = True
# prepopulate the slug from the title - big timesaver!
prepopulated_fields = {"slug": ("title",)}
admin.site.register(Team)
admin.site.register(Match)