Fix for expired tokens.
[wolnelektury.git] / src / stats / admin.py
index 979f180..9e5ab47 100644 (file)
@@ -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)