5👍
✅
Your get_success_url
is wrong. Change it to the following:
def get_success_url(self):
return reverse('profile-list')
reverse
should be used in conjunction with the names that you give inside your urls.py
patterns and not template names.
2👍
Your reverse
call is incorrect. According to the docs:
reverse(viewname[, urlconf=None, args=None, kwargs=None,
current_app=None])viewname is either the function name (either a
function reference, or the string version of the name, if you used
that form in urlpatterns) or the URL pattern name.
So, replace
reverse('profile_list.html')
with
reverse('profile-list')
profile-list
is the URL pattern name, that you’ve defined in urls.py
.
Hope that helps.
- [Django]-Django distinct on case sensitive entries
- [Django]-Pyapns Fault 500: 'Connection to the APNS server could not be made
- [Django]-How can I grab the ID passed to a Django REST API?
Source:stackexchange.com