sync from local backup
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
from django.contrib import admin
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from .models import BrowsingHistory
|
||||
|
||||
|
||||
@admin.register(BrowsingHistory)
|
||||
class BrowsingHistoryAdmin(admin.ModelAdmin):
|
||||
list_display = ['id', 'user', 'type', 'title', 'category', 'viewed_at']
|
||||
list_filter = ['type', 'category', 'viewed_at']
|
||||
search_fields = ['title', 'description', 'user__username']
|
||||
ordering = ['-viewed_at']
|
||||
date_hierarchy = 'viewed_at'
|
||||
list_per_page = 50
|
||||
|
||||
fieldsets = (
|
||||
(_('Basic Information'), {
|
||||
'fields': ('user', 'type', 'title')
|
||||
}),
|
||||
(_('Detailed Information'), {
|
||||
'fields': ('description', 'image', 'category', 'link')
|
||||
}),
|
||||
(_('Time'), {
|
||||
'fields': ('viewed_at',)
|
||||
}),
|
||||
)
|
||||
|
||||
readonly_fields = ['viewed_at']
|
||||
Reference in New Issue
Block a user