Answer the question
In order to leave comments, you need to log in
How to determine which device is making a request to django?
Good evening! Look, there is code of the following character
The URL is directed to a django service that renders and serves the js file.
Actually, the problem is the following: for desktop platforms (PCs) you need to generate one script, and for PDAs (smartphones, tablets) you need to generate another script and give another code. How to determine from which device a request is made in django ??? Found a couple of guides. The article from habr did not help in any way from mail which
Answer the question
In order to leave comments, you need to log in
1) You can try to determine based on request.META. This is a probabilistic method, there is no 100% method!
2) The backend should not take care of the platform and give different content.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question