#16146: Calling functions with arguments inside a template
------------------------------------+--------------------------------------
     Reporter:  pmandel@…           |                    Owner:  nobody
         Type:  New feature         |                   Status:  closed
    Component:  Template system     |                  Version:  1.3
     Severity:  Normal              |               Resolution:  wontfix
     Keywords:  template, function  |             Triage Stage:  Unreviewed
    Has patch:  0                   |      Needs documentation:  0
  Needs tests:  0                   |  Patch needs improvement:  0
Easy pickings:  0                   |                    UI/UX:  0
------------------------------------+--------------------------------------
Changes (by imfletcher):

 * ui_ux:   => 0


Comment:

 I think this needs to be revisited.  This is a strange limitation that
 causes a lot of extra confusing code.  It leads to views adding transient
 properties to objects and other such workarounds that are hard to follow,
 hard to maintain and hard to document.  passing an argument to a method is
 not a 'bridge too far' for a template language.  Parameters are additional
 filters and the need to use them comes up quite often.

 This line in the sand drives people to jinja2 and hackery, and it does not
 need to be that way.  there is nothing wrong with () having special
 meaning just like . has special meaning.  foo(bar) vs foo.bar can easily
 be interpreted as separate items, with foo.bar having the current meaning
 and foo(bar) being a new way to pass variables.  I'm sure there are edge
 cases to be worked out, but i'm also sure its worth it.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16146#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/077.bd26c288cd4d18e5bce74aa4c5c76703%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to