Code

Opened 5 years ago

Closed 5 years ago

#10338 closed (invalid)

Typo "yeah" instead of "yes" in docs

Reported by: jumpfroggy Owned by: nobody
Component: Documentation Version: 1.0
Severity: Keywords: typo documentation
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

In the documentation for the "yesno" filter, it lists the output as "yeah" and "no". This should be "yes" and "no".
http://docs.djangoproject.com/en/dev/ref/templates/builtins/#yesno
Thanks!

Attachments (0)

Change History (1)

comment:1 Changed 5 years ago by kmtracey

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

The filter output is whatever you want based on the argument value:

>>> t = Template('{{ x|yesno:"yes!,never!,perhaps"}}')
>>> t.render(Context({'x': True}))
u'yes!'
>>> t.render(Context({'x': False}))
u'never!'
>>> t.render(Context({'x': None}))
u'perhaps'
>>> 

I expect "yeah" was chosen for the doc in an attempt to emphasize that the output is not restricted to yes/no, but rather controlled by the argument. Since "yeah" is used consistently in the argument and output I don't see there is anything in error in the docs.

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.