Skip to content
This repository was archived by the owner on May 23, 2020. It is now read-only.

Commit 475fba5

Browse files
committed
Update admin.py to show all hit record of post
1 parent 11f25c6 commit 475fba5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

update-1.1/blog/admin.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,15 @@ class Media:
9797

9898
class TagAdmin(admin.ModelAdmin):
9999
list_per_page = 10
100-
100+
101+
class Entry_Views_Admin(admin.ModelAdmin):
102+
list_display = ("entry", "ip", "session", "created")
103+
list_per_page = 20
104+
105+
101106
admin.site.register(models.Author, AuthorAdmin)
102107
admin.site.register(models.Entry, EntryAdmin)
103108
admin.site.register(models.Gallery, GalleryAdmin)
104109
admin.site.register(models.Page, PageAdmin)
105110
admin.site.register(models.Tag, TagAdmin)
111+
admin.site.register(models.Entry_Views, Entry_Views_Admin)

0 commit comments

Comments
 (0)