Opened 6 years ago

Closed 5 years ago

#10903 closed (fixed)

Docs: Accessing method calls from templates

Reported by: shacker 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: UI/UX:

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 shacker 6 years ago.
Implements Malcolm's suggestion
10903.diff (2.2 KB) - added by timo 6 years ago.
initial patch looks solid, just tweaking some links and grammar

Download all attachments as: .zip

Change History (7)

comment:1 Changed 6 years ago by mtredinnick

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement set
  • Triage Stage changed from Unreviewed to Accepted

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.

Changed 6 years ago by shacker

Implements Malcolm's suggestion

comment:2 Changed 6 years ago by shacker

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.

Changed 6 years ago by timo

initial patch looks solid, just tweaking some links and grammar

comment:3 Changed 6 years ago by timo

  • Triage Stage changed from Accepted to Ready for checkin

comment:4 Changed 6 years ago by jacob

  • Patch needs improvement unset

comment:5 Changed 5 years ago by mtredinnick

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

(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