Loading docs/ref/class-based-views/generic-editing.txt +18 −6 Original line number Diff line number Diff line Loading @@ -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`:: Loading Loading @@ -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**:: Loading Loading @@ -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**:: Loading Loading @@ -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**:: Loading docs/ref/class-based-views/mixins-editing.txt +3 −1 Original line number Diff line number Diff line Loading @@ -9,7 +9,9 @@ The following mixins are used to construct Django's editing views: * :class:`django.views.generic.edit.ProcessFormView` * :class:`django.views.generic.edit.DeletionMixin` .. note:: Examples of how these are combined into editing views can be found at .. note:: Examples of how these are combined into editing views can be found at the documentation on ``Generic editing views``. .. class:: django.views.generic.edit.FormMixin Loading Loading
docs/ref/class-based-views/generic-editing.txt +18 −6 Original line number Diff line number Diff line Loading @@ -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`:: Loading Loading @@ -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**:: Loading Loading @@ -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**:: Loading Loading @@ -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**:: Loading
docs/ref/class-based-views/mixins-editing.txt +3 −1 Original line number Diff line number Diff line Loading @@ -9,7 +9,9 @@ The following mixins are used to construct Django's editing views: * :class:`django.views.generic.edit.ProcessFormView` * :class:`django.views.generic.edit.DeletionMixin` .. note:: Examples of how these are combined into editing views can be found at .. note:: Examples of how these are combined into editing views can be found at the documentation on ``Generic editing views``. .. class:: django.views.generic.edit.FormMixin Loading