From 324658ef265fb9a4c5cc695a4b0f560575048604 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Sat, 4 Dec 2010 11:20:30 +0000 Subject: Fixed #14803 -- Corrected an inconsistency in redirection handling between old-style generic views and class-based views. Thanks to gg for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14808 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/ref/class-based-views.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'docs/ref') diff --git a/docs/ref/class-based-views.txt b/docs/ref/class-based-views.txt index 758763f845..28ce024483 100644 --- a/docs/ref/class-based-views.txt +++ b/docs/ref/class-based-views.txt @@ -481,6 +481,11 @@ ModelFormMixin The URL to redirect to when the form is successfully processed. + ``success_url`` may contain dictionary string formatting, which + will be interpolated against the object's field attributes. For + example, you could use ``success_url="/polls/%(slug)s/"`` to + redirect to a URL composed out of the ``slug`` field on a model. + .. method:: get_form_class() Retrieve the form class to instantiate. If -- cgit v1.3