Commit 2483903cd66f48668460c7646e5779fa2ed5d132
1 parent
3b03041a
Exists in
master
and in
2 other branches
Including news in admin system
Showing
1 changed file
with
7 additions
and
1 deletions
Show diff stats
news/admin.py
1 | from django.contrib import admin | 1 | from django.contrib import admin |
2 | - | 2 | +from .models import News |
3 | # Register your models here. | 3 | # Register your models here. |
4 | + | ||
5 | +class NewsAdmin(admin.ModelAdmin): | ||
6 | + list_display = ['title', 'slug', 'creator', 'create_date'] | ||
7 | + search_fields = ['title'] | ||
8 | + | ||
9 | +admin.site.register(News, NewsAdmin) |