django-tracking-analyzer icon indicating copy to clipboard operation
django-tracking-analyzer copied to clipboard

Pip installation admin page error

Open gomezag opened this issue 3 years ago • 0 comments

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!

gomezag avatar Jun 02 '21 12:06 gomezag