Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#12135 closed (fixed)

confusion between get_current_time and do_current_time

Reported by: Daniele Procida 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 Tim Graham 7 years ago.
12135b.diff (542 bytes) - added by Tim Graham 7 years ago.

Download all attachments as: .zip

Change History (5)

Changed 7 years ago by Tim Graham

Attachment: 12135a.diff added

Changed 7 years ago by Tim Graham

Attachment: 12135b.diff added

comment:1 Changed 7 years ago by Tim Graham

Has patch: set
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedReady 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 6 years ago by Russell Keith-Magee

Resolution: fixed
Status: newclosed

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

comment:3 Changed 6 years ago by Russell Keith-Magee

(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.

Note: See TracTickets for help on using tickets.
Back to Top