2010-04-20 75 views

回答

11
request.META['REQUEST_URI'] 

request.get_full_path() 

你往往產生的瑣碎問題,答案洪水到你可以在文檔/谷歌可以輕鬆地查找...

+4

笑@瑣碎的問題,部分.. 。 – 2010-04-20 09:12:58

+0

更新,使用'''request.path_info'''在Django 1.7上更新,文檔:https://docs.djangoproject.com/en/1.7/ref/request-response/ – 2014-11-01 19:09:56

+0

另一個快速調試選項是在您的視圖中添加打印(dir(請求))。 – 2016-07-05 18:51:21

相關問題