Code

Opened 6 years ago

Closed 6 years ago

#6659 closed (fixed)

documentation: forloop not introduced in tutorial 4

Reported by: pj Owned by: nobody
Component: Documentation Version: master
Severity: Keywords: tutorial forloop
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

At the start of "Writing your first Django app, part 4" in the first template code in the section "Write a simple form", I initially wondered where forloop had come from. The documentation text (templates.txt) explains the magic, but a pointer to this seems a good idea.

So, in the quick rundown list that follows the template, I suggest you add:

  • The forloop.counter is an automatic index associated with the for loop that starts at 1. For more information on <whateverformat>forloop</format> variables, see the <whateverlink>forloop</link> documentation.

Attachments (1)

6659.docs.tutorial04.diff (735 bytes) - added by PJCrosier 6 years ago.
Introduce forloop.couinter and point to the for loop documentation

Download all attachments as: .zip

Change History (3)

Changed 6 years ago by PJCrosier

Introduce forloop.couinter and point to the for loop documentation

comment:1 Changed 6 years ago by PJCrosier

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

Quick patch attached, tested with SmileyChris's django_docs.

comment:2 Changed 6 years ago by ubernostrum

  • Resolution set to fixed
  • Status changed from new to closed

(In [7315]) Fixed #6659: explained where "forloop.counter" comes from

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.