Fixed #20565 -- Added template examples for GCBV. #1271

Merged
merged 1 commit into from Jun 14, 2013

Conversation

Projects
None yet
3 participants
Contributor

batisteo commented Jun 14, 2013

Thanks to David Reitter for the report.

docs/ref/class-based-views/generic-editing.txt
+ .. code-block:: html+django
+
+ <form action="" method="post">{% csrf_token %}
+ <p><label for="id_name">Name:</label>
@bmispelon

bmispelon Jun 14, 2013

Member

I think {{ form.as_p }} is better here.

docs/ref/class-based-views/generic-editing.txt
@@ -98,10 +112,10 @@ CreateView
The ``CreateView`` page displayed to a ``GET`` request uses a
``template_name_suffix`` of ``'_form'``. For
example, changing this attribute to ``'_create_form'`` for a view
- creating objects for the example ``Author`` model would cause the
+ creating objects for the Example Author`` model would cause the
@bmispelon

bmispelon Jun 14, 2013

Member

I think this line is incorrect.

docs/ref/class-based-views/generic-editing.txt
@@ -140,10 +164,10 @@ UpdateView
The ``UpdateView`` page displayed to a ``GET`` request uses a
``template_name_suffix`` of ``'_form'``. For
example, changing this attribute to ``'_update_form'`` for a view
- updating objects for the example ``Author`` model would cause the
+ updating objects for the Example Author`` model would cause the
@bmispelon

bmispelon Jun 14, 2013

Member

Incorrect.

docs/ref/class-based-views/generic-editing.txt
+
+
+ **Example myapp/author_update_form.html**:
+
@bmispelon

bmispelon Jun 14, 2013

Member

One empty line is enough I think.

docs/ref/class-based-views/generic-editing.txt
@@ -181,11 +217,11 @@ DeleteView
The ``DeleteView`` page displayed to a ``GET`` request uses a
``template_name_suffix`` of ``'_confirm_delete'``. For
example, changing this attribute to ``'_check_delete'`` for a view
- deleting objects for the example ``Author`` model would cause the
+ deleting objects for the Example Author`` model would cause the
@bmispelon

bmispelon Jun 14, 2013

Member

Incorrect

docs/ref/class-based-views/generic-display.txt
+ <ul>
+ {% for article in object_list %}
+ <li>{{ article.pub_date|date }} - {{ article.headline }}</li>
+ {% endfor %}
@mjtamlyn

mjtamlyn Jun 14, 2013

Member

This would be better with an {% empty %} version

docs/ref/class-based-views/generic-editing.txt
+
+ <form action="" method="post">{% csrf_token %}
+ <p>Are you sure you want to delete "{{ object }}"?</p>
+ <input type="submit" value="Yes, delete" />
@mjtamlyn

mjtamlyn Jun 14, 2013

Member

"Confirm" would be a better label

Member

mjtamlyn commented Jun 14, 2013

Generally this looks good. Would it be possible for you to do the date based views as well? The ticket isn't really done with only have the views. Mixins obviously don't need examples.

Fixed #20565 -- Added template examples for GCBV.
Thanks to David Reitter for the report,
and to Marc Tamlyn and Baptiste Mispelon for the review.

mjtamlyn added a commit that referenced this pull request Jun 14, 2013

Merge pull request #1271 from batisteo/ticket-20565
Fixed #20565 -- Added template examples for GCBV.

@mjtamlyn mjtamlyn merged commit f656757 into django:master Jun 14, 2013

Member

mjtamlyn commented Jun 14, 2013

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment