Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#17384 closed Bug (invalid)

Bug in tutorial part 4 code: polls/detail.html

Reported by: dan_coffey@… Owned by: nobody
Component: Documentation Version: 1.3
Severity: Normal Keywords: tutorial, csrf_token
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Hi,

I have been doing your tutorial verbatim, and found a bug. In the template you provide (top of part 4) on line 6: {% csrf_token %} gave me an error. I changed this to {{ csrf_token }} and everything worked great. Please fix or tell me I'm wrong!
Thanks,

Dan

Change History (4)

comment:1 follow-up: Changed 3 years ago by charettes

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to needsinfo
  • Status changed from new to closed

I haven't done the whole tutorial steps but {% csrf_token %} should be working. Can you us provide the traceback of the error you're having? I'll mark bug as needsinfo until then.

comment:2 in reply to: ↑ 1 Changed 3 years ago by anonymous

  • Resolution needsinfo deleted
  • Status changed from closed to reopened

Traceback:
http://dpaste.com/672554/

Replying to charettes:

I haven't done the whole tutorial steps but {% csrf_token %} should be working. Can you us provide the traceback of the error you're having? I'll mark bug as needsinfo until then.

comment:3 Changed 3 years ago by charettes

  • Resolution set to invalid
  • Status changed from reopened to closed

I think you are running django 1.1.1 (see traceback) while reading django 1.3 docs. You can either update your installed version or switch to 1.1.1 doc using the documentation version chooser at the bottom right of the documentation.

Here's the 1.1.1 doc https://docs.djangoproject.com/en/1.1/intro/tutorial04/#intro-tutorial02

comment:4 Changed 3 years ago by kmtracey

I strongly suggest updating your code level. 1.1.1 is very old, there have been many very significant features and bug fixes made since then.

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