2019-06-27 06:09:51 +00:00
|
|
|
from django.contrib import admin
|
|
|
|
|
2019-12-28 21:44:14 +00:00
|
|
|
from bookmarks.models import Bookmark, Tag
|
2019-06-27 06:09:51 +00:00
|
|
|
|
2019-12-28 21:44:14 +00:00
|
|
|
@admin.register(Bookmark)
|
|
|
|
class AdminBookmark(admin.ModelAdmin):
|
|
|
|
list_display = ('title', 'url', 'date_added')
|
|
|
|
search_fields = ('title', 'url', 'tags__name')
|
|
|
|
list_filter = ('tags',)
|
|
|
|
ordering = ('-date_added', )
|
|
|
|
|
|
|
|
@admin.register(Tag)
|
|
|
|
class AdminTag(admin.ModelAdmin):
|
|
|
|
list_display = ('name', 'date_added', 'owner')
|
|
|
|
search_fields = ('name', 'owner__username')
|
|
|
|
list_filter = ('owner__username', )
|
|
|
|
ordering = ('-date_added', )
|