hi, im trying to use redirect shortcut, but im having problems passing
arguments to the view i want to reverse.
view definition is this:
def profile(request, activation_key=None, new=None):
if new is None:
return HttpResponse("You're at the profile.")
else:
return HttpResponse("New User!\nYou're at the profile.")
my urls looks like this (and works):
url(r'^profile/(?P<activation_key>\w+)/$', profile, {'new': 1},
name='profile_view'),
but in other view, i try to use redirect, doing this:
....
kwargs['new'] = 1
return redirect(success_url, **kwargs)
....
I add 'new' parameter and sets it to 1 (just like in url definition!),
but it fails:
Reverse for 'profile_view' with arguments '()' and keyword arguments
'{'new': 1, 'activation_key':
u'ad6ef997beccb16dee9184d1602dad086dfa1b97'}' not found.
the point is that if i delete that param (new), from view definition,
url, and dont add in the view calls return, it works...
some idea??
thanks!
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.