Page not found (404) passing two variables through URL django

43 views
Skip to first unread message

Ravin Kohli

unread,
Dec 17, 2016, 10:50:16 AM12/17/16
to Django developers (Contributions to Django itself)

this is the actual url
http://127.0.0.1:8000/receive/kohli/50/

why is it not matching to the pattern

this is my redirect call
return redirect('/receive/%s/%s/' % (request.POST.get('receiver'), withdraw))

this is the urlpattern
url(r'^receive/(?P<username>[a-zA-Z]+)/(<?P<amount>[0-9]+)/$', receive_money)


Alex Gaynor

unread,
Dec 17, 2016, 10:52:03 AM12/17/16
to django-d...@googlegroups.com
This list is for the development of Django, not development with Django. Please use the django-users mailing list.

That said, the problem is that you have an extra "<" after the "(" in the amount capture.

Alex

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscribe@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/48f9c922-185d-4013-ad0b-768fe4747030%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
"I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
"The people's good is the highest law." -- Cicero
GPG Key fingerprint: D1B3 ADC0 E023 8CA6

Reply all
Reply to author
Forward
0 new messages