django-user_agents icon indicating copy to clipboard operation
django-user_agents copied to clipboard

Usage in middleware

Open rocchidavide opened this issue 7 years ago • 3 comments

Is it possible to use it in a middleware?

rocchidavide avatar Jul 16 '16 16:07 rocchidavide

Well... It is a middleware (see https://github.com/selwin/django-user_agents/blob/master/README.rst#middleware), so you can just place your own middleware after the this one, and have it accessible there.

beruic avatar Jul 18 '16 14:07 beruic

I have already user_agents middleware put before mine, but it works only in process_view(), not in process_request().. is it ok?

rocchidavide avatar Jul 18 '16 14:07 rocchidavide

How exactly do you use it?

beruic avatar Jul 21 '16 10:07 beruic