python - django uses redirect to jump to the web page, how to pass the referer to the target web page
为情所困
为情所困 2017-05-18 10:50:32
0
1
892

As shown below, when developing and logging in, the referer address of the http request that jumps to WeChat must be consistent with the backend.

I use django'sreturn redirect(url)to jump to the WeChat login interface. WeChat cannot get the referer address. I want to know how to pass this referer address?

If you create a login hyperlink to the WeChat login interface, you can have a referer at this time, but I want to automatically go to the WeChat login interface when the user is not logged in. Looking for a solution

为情所困
为情所困

reply all (1)
世界只因有你

META in request actually contains a lot of information, one of which is HTTP_REFERER
You can request.META.get('HTTP_REFERER') to get the referer address

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!