[Answered ]-How come this Django matching doesn't work in urls.py?

1👍

URLs don’t match on query parameters. They take the path (everything before the ?) from the request, and attempts to match against your URL regex.

What you need to do is handle the GET parameters in your view, and route from there to other functions if you need to. Example:

request: http://www.mydomain.com/signup/?password=goodbye 

(r'^signup/$','abc.wall.views.signup_front')

def signup_front(self, request):
    query_param = request.GET.get('password', None)
    if query_param == "goodbye":
        return signup_goodbye(request)
    # other stuff here

def signup_goodbye(self, request):
    # blah
    # return render_to_response(..)

1👍

Leave a comment