Opened 13 years ago
Closed 13 years ago
#17179 closed Cleanup/optimization (fixed)
yesno arg is optional
Reported by: | CarlFK | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 1.3 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
"Given a string mapping values for true, false and (optionally) None, returns one of those strings according to the value:"
https://docs.djangoproject.com/en/dev/ref/templates/builtins/#yesno
Looking at the code, I see the string is optional.
if arg is None:
arg = ugettext('yes,no,maybe')
http://code.djangoproject.com/svn/django/trunk/django/template/defaultfilters.py
Attachments (1)
Change History (3)
comment:1 by , 13 years ago
Triage Stage: | Unreviewed → Accepted |
---|---|
Type: | Uncategorized → Cleanup/optimization |
by , 13 years ago
Attachment: | 17179.diff added |
---|
yesno docs now explain the argument is optional, and the default
Note:
See TracTickets
for help on using tickets.
Accepted. The documentation could be improved by noting that if no argument is provided then the default is "yes,no,maybe".