summaryrefslogtreecommitdiff
path: root/docs/ref/class-based-views/generic-editing.txt
diff options
context:
space:
mode:
authorDaniel Greenfeld <pydanny@gmail.com>2012-08-04 13:01:40 -0700
committerDaniel Greenfeld <pydanny@gmail.com>2012-08-04 13:01:40 -0700
commit1fefd91e1e9facc786d27e3234cb69c4212f6d1d (patch)
treea1ff1788879cc192fae94364bc3a57fba89bda8e /docs/ref/class-based-views/generic-editing.txt
parentb90caf014c8cb447d34217e81bbc3fb57b2df89b (diff)
For #210, cleaned up text and formatting.
Diffstat (limited to 'docs/ref/class-based-views/generic-editing.txt')
-rw-r--r--docs/ref/class-based-views/generic-editing.txt24
1 files changed, 18 insertions, 6 deletions
diff --git a/docs/ref/class-based-views/generic-editing.txt b/docs/ref/class-based-views/generic-editing.txt
index 78f46851f7..a65a59bc8b 100644
--- a/docs/ref/class-based-views/generic-editing.txt
+++ b/docs/ref/class-based-views/generic-editing.txt
@@ -10,7 +10,9 @@ editing content:
* :class:`django.views.generic.edit.UpdateView`
* :class:`django.views.generic.edit.DeleteView`
-.. note:: Some of the examples on this page assume that a model titled 'authors'
+.. note::
+
+ Some of the examples on this page assume that a model titled 'Author'
has been defined. For these cases we assume the following has been defined
in `myapp/models.py`::
@@ -92,7 +94,10 @@ editing content:
.. attribute:: template_name_suffix
The CreateView page displayed to a GET request uses a
- ``template_name_suffix`` of ``'_form'``.
+ ``template_name_suffix`` of ``'_form.html'``. For
+ example, changing this attribute to ``'_create_form.html'`` for a view
+ creating objects for the the example `Author` model would cause the the
+ default `template_name` to be ``'myapp/author_create_form.html'``.
**Example views.py**::
@@ -127,8 +132,11 @@ editing content:
.. attribute:: template_name_suffix
- The CreateView page displayed to a GET request uses a
- ``template_name_suffix`` of ``'_form'``.
+ The UpdateView page displayed to a GET request uses a
+ ``template_name_suffix`` of ``'_form.html'``. For
+ example, changing this attribute to ``'_update_form.html'`` for a view
+ updating objects for the the example `Author` model would cause the the
+ default `template_name` to be ``'myapp/author_update_form.html'``.
**Example views.py**::
@@ -162,8 +170,12 @@ editing content:
.. attribute:: template_name_suffix
- The CreateView page displayed to a GET request uses a
- ``template_name_suffix`` of ``'_confirm_delete'``.
+ The DeleteView page displayed to a GET request uses a
+ ``template_name_suffix`` of ``'_confirm_delete.html'``. For
+ example, changing this attribute to ``'_check_delete.html'`` for a view
+ deleting objects for the the example `Author` model would cause the the
+ default `template_name` to be ``'myapp/author_check_delete.html'``.
+
**Example views.py**::