Fixed #14495 -- DeletionMixin and FormMixin don't have an object to work 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
This commit is contained in:
Honza Král 2010-10-19 07:22:38 +00:00
parent f6a0b7cfe3
commit 1a270bd103
1 changed files with 2 additions and 4 deletions

View File

@ -50,8 +50,7 @@ class FormMixin(object):
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 @@ class DeletionMixin(object):
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):
"""