django的template模版中获取当前URL

1.传递request进template

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

 

 

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

posted @ 2012-08-01 15:46  jianhong  阅读(647)  评论(0编辑  收藏  举报