1.传递request进template

2.使用request.get_full_path或者request.path即可

 

 

参考http://stackoverflow.com/questions/2882490/get-the-current-url-within-a-django-template