django-tracking-analyzer
django-tracking-analyzer copied to clipboard
Pip installation admin page error
Hello, I'm not sure where else I can post this, but here it goes. Following a pip installation I realized two things:
-
In step 2) of the installation instructions it should be mentioned that one must include the 'django_user_agents.middleware.UserAgentMiddleware' into the Middleware settings of the project.
-
The second thing is that the tracker page in the admin site throws 'EmptyPage at /admin/tracking_analyzer/tracker/' error. This is happening because in the admin.py file the current page is assumed to begin at 0 (so it asks for page current_page+1), but this is not the case.. deleting the +1 in in line 198
current_pks = response.context_data['cl'].paginator.page( current_page + 1).object_list.values_list('pk', flat=True)
fixes the problem.
I hope someone can push these changes! If i get around making a pull request I will. Thanks for this project!