Ticket #19044: 19044.diff

File 19044.diff, 777 bytes (added by Nicolas Valcárcel, 12 years ago)
  • django/views/generic/edit.py

    diff --git a/django/views/generic/edit.py b/django/views/generic/edit.py
    index e51cdf5..2dc1d6a 100644
    a b class DeletionMixin(object):  
    240240        redirects to the success URL.
    241241        """
    242242        self.object = self.get_object()
     243        success_url = get_success_url()
    243244        self.object.delete()
    244245        return HttpResponseRedirect(self.get_success_url())
    245246
    class DeletionMixin(object):  
    249250
    250251    def get_success_url(self):
    251252        if self.success_url:
    252             return self.success_url
     253            return self.success_url % self.object.dict
    253254        else:
    254255            raise ImproperlyConfigured(
    255256                "No URL to redirect to. Provide a success_url.")
Back to Top