Commit 1a270bd1 authored by Honza Král's avatar Honza Král
Browse files

Fixed #14495 -- DeletionMixin and FormMixin don't have an object to work with...

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
parent f6a0b7cf
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -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):
    """