Django: How to write the reverse function for the following
Posted
by ninja123
on Stack Overflow
See other posts from Stack Overflow
or by ninja123
Published on 2010-06-07T11:21:03Z
Indexed on
2010/06/07
12:42 UTC
Read the original article
Hit count: 192
The urlconf and view is as follows:
url(r'^register/$',
register,
{ 'backend': 'registration.backends.default.DefaultBackend' },
name='registration_register'),
def register(request, backend, success_url=None, form_class=None,
disallowed_url='registration_disallowed',
template_name='registration/registration_form.html',
extra_context=None):
What i want to do is redirect users to the register page and specify a success_url. I tried reverse('registration.views.register', kwargs={'success_url':'/test/' }) but that doesn't seem to work. I've been trying for hours and can't get my mind around getting it right. Thanks
© Stack Overflow or respective owner