thank you for all the quick replies.
Mmmmh, its good to see that it is there, though I think
{{ num_files or "no" }}
looks better and is closer to what I would expect ...
but thats just an aesthetical thing, I guess.
thanks a lot
Wolfram
On Fri, Apr 25, 2008 at 4:18 PM, Honza Král <[EMAIL PROTECTED]> wrote:
> there is a template filter called default, that does exactly this.
>
> http://www.djangoproject.com/documentation/templates/#default
>
> On Fri, Apr 25, 2008 at 4:15 PM, Wolfram Kriesing
>
> <[EMAIL PROTECTED]> wrote:
> >
>
>
> > I guess it might had been discussed, just didnt find anything.
> > This extended syntax would really make some writing shorter
> >
> > user has {{ num_files or "no" }} files
> >
> > now, you have to write
> >
> > user has {% if num_files %} {{ num_files }} {% else %} no {%
> > endif %} files
> >
> > Are there any opinions on that?
> > my 2 cents
> >
> > --
> > cu
> >
> > Wolfram
> >
> > >
> >
>
>
>
> --
> Honza Král
> E-Mail: [EMAIL PROTECTED]
> ICQ#: 107471613
> Phone: +420 606 678585
>
>
>
> >
>
--
cu
Wolfram
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---