1
如何從第一個網站重定向到第二個網站。Django如何通過郵政查詢字符串重定向到其他網站
第二個站點有形式:
<form action="http://example.com/authAs" method="POST">
<input id="login" type="text" name="login"></td>
<input id="password" type="password" name="password"></td>
<button type="submit">login</button>
</form>
我希望用戶在第一現場驗證和重定向到已經被POST請求
我該怎麼辦呢授權的第二個站點?
我試圖做到這一點:
import urllib2,urllib
post_data = [('login', login), ('password', password)]
result = urllib2.urlopen('http://example.com/authAs', urllib.urlencode(post_data))
content = result.read()
但如何重定向用戶授權頁面上第二個網站?
向我們展示了視圖 – lalo