X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/1f4c831ff6f96b3a34fcca497adfd16838abc569..0c502550a4f04aa016df8729af2ae2f85c0b495a:/src/stats/admin.py diff --git a/src/stats/admin.py b/src/stats/admin.py index 979f18022..9e5ab4744 100644 --- a/src/stats/admin.py +++ b/src/stats/admin.py @@ -2,4 +2,12 @@ from django.contrib import admin from . import models -admin.site.register(models.Visits) +class VisitsAdmin(admin.ModelAdmin): + list_display = ['book', 'date', 'views', 'unique_views'] + raw_id_fields = ['book'] + date_hierarchy = 'date' + + + +admin.site.register(models.Visits, VisitsAdmin) +admin.site.register(models.DayVisits, VisitsAdmin)