You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
613 B
24 lines
613 B
from django.contrib import admin
|
|
|
|
# Register your models here.
|
|
from library.models import Article, Tags, ArticleSection
|
|
|
|
|
|
class ArticleAdmin(admin.ModelAdmin):
|
|
list_display = ('title', 'section', 'date', 'public', 'slug', )
|
|
filter_horizontal = ('tags', 'comments', )
|
|
search_fields = ['title']
|
|
|
|
admin.site.register(Article, ArticleAdmin)
|
|
|
|
|
|
class TagsAdmin(admin.ModelAdmin):
|
|
list_display = ('name', )
|
|
|
|
admin.site.register(Tags, TagsAdmin)
|
|
|
|
|
|
class ArticleSectionAdmin(admin.ModelAdmin):
|
|
list_display = ('name', )
|
|
|
|
admin.site.register(ArticleSection, ArticleSectionAdmin)
|
|
|