Skip to content

Commit

Permalink
Fixed #14495 -- DeletionMixin and FormMixin don't have an object to w…
Browse files Browse the repository at this point in the history
…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
honzakral committed Oct 19, 2010
1 parent f6a0b7c commit 1a270bd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions django/views/generic/edit.py
Expand Up @@ -50,8 +50,7 @@ def get_success_url(self):
url = self.success_url url = self.success_url
else: else:
raise ImproperlyConfigured( raise ImproperlyConfigured(
"No URL to redirect to. Either provide a url or define" "No URL to redirect to. Provide a success_url.")
" a get_absolute_url method on the Model.")
return url return url


def form_valid(self, form): def form_valid(self, form):
Expand Down Expand Up @@ -231,8 +230,7 @@ def get_success_url(self):
return self.success_url return self.success_url
else: else:
raise ImproperlyConfigured( raise ImproperlyConfigured(
"No URL to redirect to. Either provide a url or define" "No URL to redirect to. Provide a success_url.")
" a get_absolute_url method on the Model.")


class BaseDeleteView(DeletionMixin, BaseDetailView): class BaseDeleteView(DeletionMixin, BaseDetailView):
""" """
Expand Down

0 comments on commit 1a270bd

Please sign in to comment.