How to detect Browser type in Django?

前端 未结 5 1458
北恋
北恋 2020-12-23 16:05

How can i detect which browser type the client is using. I have a problem where i have to ask people to use different browser (Firefox) instead of IE. How can i get this inf

5条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-23 16:44

    You can extract that information from the request object like so:

    request.META['HTTP_USER_AGENT']
    

提交回复
热议问题