diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2010-12-04 11:20:30 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2010-12-04 11:20:30 +0000 |
| commit | 324658ef265fb9a4c5cc695a4b0f560575048604 (patch) | |
| tree | 31f9d8dfb5f609cebf27aa04093ed1f5c1c13f09 /docs | |
| parent | ac91d5ef086f466c27e77157c67fe4f1df9b7557 (diff) | |
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
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/class-based-views.txt | 5 | ||||
| -rw-r--r-- | docs/topics/generic-views-migration.txt | 7 |
2 files changed, 12 insertions, 0 deletions
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 diff --git a/docs/topics/generic-views-migration.txt b/docs/topics/generic-views-migration.txt index 407ef24e49..bf3a5f2b62 100644 --- a/docs/topics/generic-views-migration.txt +++ b/docs/topics/generic-views-migration.txt @@ -113,6 +113,13 @@ For example:: }) return context +``post_save_redirect`` argument to create and update views +---------------------------------------------------------- + +The ``post_save_redirect`` argument to the create and update views +has been renamed ``success_url`` on the +:class:`~django.views.generic.edit.ModelFormMixin`. + ``mimetype`` ------------ |
