From 1a270bd1038a36b79dd12616ca3234e3f4b30ff3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Kr=C3=A1l?= Date: Tue, 19 Oct 2010 07:22:38 +0000 Subject: [PATCH] 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 --- django/views/generic/edit.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/django/views/generic/edit.py b/django/views/generic/edit.py index d277493691..f45a468ad6 100644 --- a/django/views/generic/edit.py +++ b/django/views/generic/edit.py @@ -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): """