Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #14495 -- DeletionMixin and FormMixin don't have an object to w…

…ork with so they cannot redirect to get_absolute_url and shouldn't claim they do.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14284 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 1a270bd1038a36b79dd12616ca3234e3f4b30ff3 1 parent f6a0b7c
@HonzaKral HonzaKral authored
Showing with 2 additions and 4 deletions.
  1. +2 −4 django/views/generic/edit.py
View
6 django/views/generic/edit.py
@@ -50,8 +50,7 @@ def get_success_url(self):
url = self.success_url
else:
raise ImproperlyConfigured(
- "No URL to redirect to. Either provide a url or define"
- " a get_absolute_url method on the Model.")
+ "No URL to redirect to. Provide a success_url.")
return url
def form_valid(self, form):
@@ -231,8 +230,7 @@ def get_success_url(self):
return self.success_url
else:
raise ImproperlyConfigured(
- "No URL to redirect to. Either provide a url or define"
- " a get_absolute_url method on the Model.")
+ "No URL to redirect to. Provide a success_url.")
class BaseDeleteView(DeletionMixin, BaseDetailView):
"""
Please sign in to comment.
Something went wrong with that request. Please try again.