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.
21 lines
533 B
21 lines
533 B
from django.contrib import admin
|
|
from .models import *
|
|
|
|
|
|
@admin.register(News)
|
|
class NewsAdmin(admin.ModelAdmin):
|
|
list_display = ('title', 'is_public')
|
|
prepopulated_fields = {"slug": ("title",)}
|
|
list_editable = ('is_public',)
|
|
list_filter = ('is_public',)
|
|
|
|
|
|
@admin.register(NewsTag)
|
|
class TagsAdmin(admin.ModelAdmin):
|
|
list_display = ('title',)
|
|
prepopulated_fields = {"slug": ("title",)}
|
|
|
|
|
|
@admin.register(NewsComment)
|
|
class CommentsAdmin(admin.ModelAdmin):
|
|
list_display = ('name', 'email', 'text', 'news')
|
|
|