1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
from django.contrib import admin
from links.models import Link
class LinkAdmin(admin.ModelAdmin):
list_display = ('title', 'rating', 'pub_date', 'status')
search_fields = ['title','description','url']
list_filter = ['rating', 'status']
fieldsets = (
(None, {'fields': ('title','url','description','rating')}),
('Details', {'fields': ('screen_url', 'pub_date', 'magnolia_id', 'tags', 'status'), 'classes': 'collapse'}),
)
admin.site.register(Link, LinkAdmin)
|