Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#15055 closed (fixed)

Forms documentation neglects csrf token

Reported by: sneakyness Owned by: nobody
Component: Documentation Version: dev
Severity: Keywords: forms, POST, csrf token, templates
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

http://docs.djangoproject.com/en/1.2/topics/forms/#displaying-a-form-using-a-template

You can see in any of the POST examples that the csrf token is not included or even mentioned.

Attachments (1)

django15055.formsdocs.diff (1.1 KB ) - added by Bas Peschier 14 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 by Luke Plant, 14 years ago

Triage Stage: UnreviewedAccepted

I remember deliberately leaving these examples as they were when other CSRF docs were changed, because from the point of view the forms documentation, adding {% csrf_token %} every time becomes annoying noise. However, I think it does need to be mentioned at least once, it's difficult to know whether it should be every time.

by Bas Peschier, 14 years ago

Attachment: django15055.formsdocs.diff added

comment:2 by Bas Peschier, 14 years ago

Has patch: set

Included the tag in the first example given with an admonition for its presence and the note that it will not be included in further examples.

comment:3 by Luke Plant, 14 years ago

Triage Stage: AcceptedReady for checkin

comment:4 by Gabriel Hurley, 14 years ago

Resolution: fixed
Status: newclosed

In [15445]:

Fixed #15055 -- added information about (and an example of) the csrf_token template tag to the forms documentation. Thanks to sneakyness for the report and bpeschier for the draft patch.

comment:5 by Gabriel Hurley, 14 years ago

In [15446]:

[1.2.X] Fixed #15055 -- added information about (and an example of) the csrf_token template tag to the forms documentation. Thanks to sneakyness for the report and bpeschier for the draft patch.

Backport of [15445] from trunk.

comment:6 by Jacob, 13 years ago

milestone: 1.3

Milestone 1.3 deleted

Note: See TracTickets for help on using tickets.
Back to Top