django blog new post

Solutions on MaxInterview for django blog new post by the best coders in the world

showing results for - "django blog new post"
Tim
31 Jul 2016
1from django.contrib import admin
2from .models import Post
3
4class PostAdmin(admin.ModelAdmin):
5    list_display = ('title', 'slug', 'status','created_on')
6    list_filter = ("status",)
7    search_fields = ['title', 'content']
8    prepopulated_fields = {'slug': ('title',)}
9  
10admin.site.register(Post, PostAdmin)