How do i pass GET parameters using django urlresolvers reverse

前端 未结 4 2042
情深已故
情深已故 2020-12-13 05:30

I am using django 1.2 and going from one view to another using the urlresolvers reverse method.

url = reverse(viewOne)

and I want to pass a

4条回答
  •  粉色の甜心
    2020-12-13 06:03

    GET parameters have nothing to do with the URL as returned by reverse. Just add it on at the end:

    url = "%s?name=joe" % reverse(viewOne)
    

提交回复
热议问题