~ubuntu-branches/debian/sid/python-django/sid

« back to all changes in this revision

Viewing changes to docs/intro/tutorial04.txt

  • Committer: Package Import Robot
  • Author(s): Luke Faraone
  • Date: 2014-04-21 16:47:14 UTC
  • mfrom: (1.3.14)
  • Revision ID: package-import@ubuntu.com-20140421164714-3mlvyr7y1ssdo9e6
Tags: 1.6.3-1
* New upstream security release.
  - Unexpected code execution using ``reverse()``
  - CVE-2014-0472
  - Caching of anonymous pages could reveal CSRF token
  - CVE-2014-0473
  - MySQL typecasting could result in unexpected matches
  - CVE-2014-0474
* Drop patches 07_translation_encoding_fix and ticket21869.diff; merged
  upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
  ``value`` of each radio button is the associated poll choice's ID. The
34
34
  ``name`` of each radio button is ``"choice"``. That means, when somebody
35
35
  selects one of the radio buttons and submits the form, it'll send the
36
 
  POST data ``choice=3``. This is the basic concept of HTML forms.
 
36
  POST data ``choice=#`` where # is the ID of the selected choice. This is the
 
37
  basic concept of HTML forms.
37
38
 
38
39
* We set the form's ``action`` to ``{% url 'polls:vote' poll.id %}``, and we
39
40
  set ``method="post"``. Using ``method="post"`` (as opposed to
268
269
 
269
270
By default, the :class:`~django.views.generic.detail.DetailView` generic
270
271
view uses a template called ``<app name>/<model name>_detail.html``.
271
 
In our case, it'll use the template ``"polls/poll_detail.html"``. The
 
272
In our case, it would use the template ``"polls/poll_detail.html"``. The
272
273
``template_name`` attribute is used to tell Django to use a specific
273
274
template name instead of the autogenerated default template name. We
274
275
also specify the ``template_name`` for the ``results`` list view --