mirror of
https://github.com/sissbruecker/linkding
synced 2024-11-22 11:23:02 +00:00
97f47713ab
- Added searching and filter capabilities in the Bookmarks section in the admin page
17 lines
517 B
Python
17 lines
517 B
Python
from django.contrib import admin
|
|
|
|
from bookmarks.models import Bookmark, Tag
|
|
|
|
@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', )
|