Code

Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#12135 closed (fixed)

confusion between get_current_time and do_current_time

Reported by: EvilDMP Owned by: nobody
Component: Documentation Version: 1.1
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#setting-a-variable-in-the-context

I think that some of the examples switch between between 'get_current_time' and 'do_current_time' in a confusing way (I got confused, anyway).

Attachments (2)

12135a.diff (589 bytes) - added by timo 5 years ago.
12135b.diff (542 bytes) - added by timo 5 years ago.

Download all attachments as: .zip

Change History (5)

Changed 5 years ago by timo

Changed 5 years ago by timo

comment:1 Changed 5 years ago by timo

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Ready for checkin

I agree this is confusing since the name get_current_time is used without warning. I think we could solve this in one of two ways: a) add an example of registering the tag or b) rename the tag to current_time like it is named in the other versions. I'm learning toward b since I don't see a reason to change the name, but I'll leave the decision up to the committer.

comment:2 Changed 4 years ago by russellm

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

(In [13220]) Fixed #12135 -- Clarified custom template tag example. Thanks to EvilDMP for the report, and timo for the patch.

comment:3 Changed 4 years ago by russellm

(In [13225]) [1.1.X] Fixed #12135 -- Clarified custom template tag example. Thanks to EvilDMP for the report, and timo for the patch.

Backport of r13220 from trunk.

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.