jose-lpa / django-tracking-analyzer

User actions tracking and analytics for Django sites :bar_chart:
GNU General Public License v3.0
96 stars 32 forks source link

'WSGIRequest' object has no attribute 'user_agent' #4

Closed mav-erick closed 4 years ago

mav-erick commented 7 years ago

Error in django 1.11. Please help.

if request.user_agent.is_mobile:

cvarelaruiz commented 6 years ago

You need to ensure that Django User Agents is installed. Then you need to add it to the INSTALLED_APPS section in your django config file as well as the 'django_user_agents.middleware.UserAgentMiddleware' to the MIDDLEWARE section (or MIDDLEWARE_CLASSES depending on your version of django) .