On Sat, Aug 15, 2009 at 6:53 PM, Daniel Roseman <dan...@roseman.org.uk>wrote:

>
> On Aug 15, 11:21 am, realfun <real...@gmail.com> wrote:
> > Sigh, seems not better way, sometimes it's ugly also to put them on the
> > views.py - A/B/C could be the attribute of an element among a list of
> > elements. Say, A is x.A, B is y.B, C is z.C, then you need to create a
> tuple
> > for them on views side, and thus make a coupling for the order in the
> tuple.
> >
> > Make everything into the views doesn't always work - at least doesn't
> always
> > work gracefully.
> >
> I think most people agree with that these days, and think the
> restrictions on conditionals within the template language was probably
> a bad idea.
>
> The best solution is to use SmilyChris's smart_if template tag:
> http://www.djangosnippets.org/snippets/1350/
> which I think will allow most of the syntax you want.
> --
> DR.
>

Thanks for the hint, I will try smart_if template tag.

--
Zhongfang

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to