我有一个这样的网址:
url(r'^(?P<user_id>\d+)/profile/$', views.ProfileView.as_view(), name='profile'),
当用户单击时,Update Profile
我会更新表单并message
使用messaging framework
.
# views
# Use the message framework to pass the message profile successfully updated
messages.success(request, 'Profile details updated.')
# Redirect to the same view with the profile updated successfully message
return HttpResponseRedirect(reverse('profile', args=(request.user.id,)))
但我得到这个错误:
NoReverseMatch at /5/profile/
Reverse for 'profile' with arguments '(5L,)' and keyword arguments '{}' not found.
怎么了?