summaryrefslogtreecommitdiff
path: root/app/links/admin.py
blob: 68efe9e8859f95deb6e28babcf73fff4b9d22343 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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',
                'link_id',
                'tags',
                'status'
            ),
            'classes': 'collapse'
        }),
    )

admin.site.register(Link, LinkAdmin)