Perhaps you should ask django-users (or the IRC channel, #django, or
stackoverflow, ...), how they would approach solving your particular problem.

I know that for me it took a few months before I realized how perfect
writing custom template tags (or template inclusion tags) are for many
blocks of logic that I have cluttered templates with in the past.

That being said, there are advantages and disadvantages to using the
Django template language as there are always tradeoffs in language
choice. If you find yourself needing a lot of power in the templates,
maybe you should try Jinja [1]. personally think Django templates are
great for large sites where the forced discipline matters a bit more,
and I use Jinja for smaller sites where I don't plan on scaling too
far.

Cheers,
Mike

1: http://jinja.pocoo.org/

On Thu, Aug 26, 2010 at 9:22 PM, Yo-Yo Ma <baxterstock...@gmail.com> wrote:
> I see what you're saying Russell. I myself am reluctant to use the
> template tag I created in some ways. Although I cannot seem to find a
> DRY way of doing what I'm doing, the idea of breaking the dogma does
> bother me a bit. I thought that if I could get confirmation from the
> crowds, it would make me feel better. Thanks a lot for ruining my evil
> plans :)
>
>
> On Aug 26, 6:30 pm, Russell Keith-Magee <russ...@keith-magee.com>
> wrote:
>> On Fri, Aug 27, 2010 at 8:06 AM, Yo-Yo Ma <baxterstock...@gmail.com> wrote:
>> > I'm sure this will be met with criticism, but there is a reason why
>> > just about all template languages allow the setting of variables.
>>
>> Yes. It's because most template languages are trying to be a Turing
>> complete programming language. Django's template language isn't.
>>
>> This leads to people putting view logic in their template, and it's
>> something Django's template language is specifically trying to
>> prevent. In my opinion (and the historical opinion of the core team)
>> this is a *feature*, not a bug.
>>
>> Yours,
>> Russ Magee %-)
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django developers" group.
> To post to this group, send email to django-develop...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-developers+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-developers?hl=en.
>
>

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

Reply via email to