X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/1f4c831ff6f96b3a34fcca497adfd16838abc569..333f7cc2ab4d123e4ffddd4f09371d06750b3631:/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)