Opened 15 years ago

Closed 14 years ago

#10903 closed (fixed)

Docs: Accessing method calls from templates

Reported by: Scot Hacker Owned by: nobody
Component: Documentation Version: 1.0
Severity: Keywords: documentation, methods, templates
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The template docs indicate that method calls can be referenced in templates but don't go into explicit detail on how to access them. As a non-hardcore programmer I found this frustrating, and have written a brief documentation section covering this (attached).

Attachments (2)

method-template-doc.diff (2.2 KB ) - added by Scot Hacker 15 years ago.
Implements Malcolm's suggestion
10903.diff (2.2 KB ) - added by Tim Graham 14 years ago.
initial patch looks solid, just tweaking some links and grammar

Download all attachments as: .zip

Change History (7)

comment:1 by Malcolm Tredinnick, 15 years ago

Patch needs improvement: set
Triage Stage: UnreviewedAccepted

If we were to include this (and it seems reasonable), it should also head off the obvious question of "how do I pass in arguments?" The answer being: "you don't", which is intentional. But that should be mentioned.

by Scot Hacker, 15 years ago

Attachment: method-template-doc.diff added

Implements Malcolm's suggestion

comment:2 by Scot Hacker, 15 years ago

The revised patch includes an additional paragraph stating that it's not possible to pass arguments to method calls in templates. Feel free to revise.

by Tim Graham, 14 years ago

Attachment: 10903.diff added

initial patch looks solid, just tweaking some links and grammar

comment:3 by Tim Graham, 14 years ago

Triage Stage: AcceptedReady for checkin

comment:4 by Jacob, 14 years ago

Patch needs improvement: unset

comment:5 by Malcolm Tredinnick, 14 years ago

Resolution: fixed
Status: newclosed

(In [13808]) Add intro-user-level documentation about calling model methods from views.

Patch from timo and shacker. Fixed #10903.

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