Code

Opened 7 years ago

Closed 7 years ago

#4325 closed (invalid)

auto_id example contains an error

Reported by: fabbe@… Owned by: jacob
Component: Documentation Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The auto_id example says:

  For example, for a format string 'field_%s', a field named subject will get the id value 'field_subject'.

But the example code says:

>>> f = ContactForm(auto_id='id_for_%s')
>>> print f.as_table()
<tr><th><label for="id_for_subject">Subject:</label></th><td><input id="id_for_subject" type="text" name="subject" maxlength="100" /></td></tr>
...

That should be ... for="field_subject" ...

Attachments (0)

Change History (1)

comment:1 Changed 7 years ago by SmileyChris

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

It says "for example", not "in the following example".

The code clearly starts with the auto_id string set to 'id_for_%s' so I don't see the error.

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.