Removed title and slug field from blogpost model and db
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user