Code

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#16295 closed Uncategorized (needsinfo)

field.auto_id not mentioned

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

Description

The documentation doesn't mention that a form field has an auto_id attribute and instead has examples showing manually entered values on HTML label "for" attributes. The values shown will be invalid if a prefix is passed to the form.

The examples should use e.g., "{{ field.auto_id }}", instead of manual values for the "for" attributes on HTML label elements.

Attachments (0)

Change History (2)

comment:1 Changed 3 years ago by julien

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

auto_id is documented here: https://docs.djangoproject.com/en/dev/ref/forms/api/

I'm not saying that the documentation can't be improved (it nearly always can), but you need to provide more specific examples to do so. Please reopen this ticket if you can provide such examples (or even better, provide a patch).

comment:2 Changed 3 years ago by hemebond@…

Ah, my apologies. When I raised the ticket I didn't think to check that the page I came from was included. I was referring to the examples on https://docs.djangoproject.com/en/dev/topics/forms/#customizing-the-form-template.

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.