On 13 October 2011 15:30, LeeS wrote:
> Not sure if this is still an ongoing discussion, but I prefer to write
> all new tags with a simple syntax that matches Python. There's no
> real advantage in defining a unique, custom syntax for a template
> tag.
>
> All HTML authors
Not sure if this is still an ongoing discussion, but I prefer to write
all new tags with a simple syntax that matches Python. There's no
real advantage in defining a unique, custom syntax for a template
tag.
All HTML authors are already familiar with Python's kwargs syntax,
since it exactly
I'll +1 the restriction of template tags to being arg/kwarg like. I see no
reason, other then porting already written tags, to worry about the ability to
do ``{% mytag foo as bar %}``. Personally I would think it would be desirable
to make this match python as much as possible. Python
Hi all,
> For many years, writing templatetags has been among the most hilariously
> complicated things we Django developers did. Anyone who has written parsing
> for
> templatetags, over and over, shares this pain. Further, the current syntax
> present a tremendous problem for Armin Ronacher's
On 09/12/2011 11:49 AM, Cal Leeming [Simplicity Media Ltd] wrote:
I may have misunderstood this thread slightly but, should templatetags
follow the same structure as *args, **kwargs??
i.e.
*args
{% create_title "hello world" 800 800 %}
**kwargs
{% create_title title="helloworld" width=800
I may have misunderstood this thread slightly but, should templatetags
follow the same structure as *args, **kwargs??
i.e.
*args
{% create_title "hello world" 800 800 %}
**kwargs
{% create_title title="helloworld" width=800 height=800 %}
mixture
{% create_title "helloworld" width=800
On 09/12/2011 10:47 AM, lucky wrote:
Hello, Alex,
I agree with Wim Feijen. The ability to implement a arbitrary syntax
for tag parameters is too abstract problem and this causes an increase
in the complexity of the solution. Tag delelopers are forced to define
a grammar and deal with lexing and
Hello, Alex,
I agree with Wim Feijen. The ability to implement a arbitrary syntax
for tag parameters is too abstract problem and this causes an increase
in the complexity of the solution. Tag delelopers are forced to define
a grammar and deal with lexing and parsing. End users must to learn
and
On Sep 11, 10:36 pm, Mikhail Korobov wrote:
> I gave up defining this template tag with existing template tag libraries:
>
> {% easy_map [ ] [] [using ] %}
>
> Can positional arguments be optional? Will it be possible to express this
> syntax?
>From the department of
I gave up defining this template tag with existing template tag libraries:
{% easy_map [ ] [] [using ] %}
Can positional arguments be optional? Will it be possible to express this
syntax?
--
You received this message because you are subscribed to the Google Groups
"Django developers"
On Fri, Sep 9, 2011 at 6:16 PM, Wim Feijen wrote:
> Hi Alex,
>
> Probably I am thinking way too simple, but if you gave me a free
> choice of how to write templatetags in my code, I would prefer:
>
> def mytag(foo, bar):
> # some code
> return output
>
> or:
>
>
Hi Alex,
Probably I am thinking way too simple, but if you gave me a free
choice of how to write templatetags in my code, I would prefer:
def mytag(foo, bar):
# some code
return output
or:
class MyTag(Tag):
def __init__(self, foo, bar):
self.foo = foo
self.bar =
Hello all,
For many years, writing templatetags has been among the most hilariously
complicated things we Django developers did. Anyone who has written parsing
for
templatetags, over and over, shares this pain. Further, the current syntax
present a tremendous problem for Armin Ronacher's GSOC
13 matches
Mail list logo