Re: ifequal support for AND OR

2006-01-13 Thread hugo
>If the templates allowed more complex logic, template designers might >be tempted to write a template that reads "if >last_payment.before(today - 1 year) and not admin". However, this >encodes a business logic decision in the template. Since the template >language does not allow complex queries,

Re: ifequal support for AND OR

2006-01-13 Thread Russell Keith-Magee
On 1/13/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I definitely understand why business logic should be kept out of the > template; I don't see why adding AND/OR support is any worse than > having if/if not/ifequal/ifnotequal/for. > > During the Snakes & Rubies talk it was mentioned that

Re: ifequal support for AND OR

2006-01-12 Thread [EMAIL PROTECTED]
I definitely understand why business logic should be kept out of the template; I don't see why adding AND/OR support is any worse than having if/if not/ifequal/ifnotequal/for. During the Snakes & Rubies talk it was mentioned that many times there has to be logic in the template, but just because

Re: ifequal support for AND OR

2006-01-12 Thread Tom Tobin
On 1/12/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hello, > In my recent project I have been finding myself wishing that the {% > ifequal %} tag had support for AND OR. Have you considered passing a boolean into the template from the view with the corresponding value? I don't think the

ifequal support for AND OR

2006-01-12 Thread [EMAIL PROTECTED]
Hello, In my recent project I have been finding myself wishing that the {% ifequal %} tag had support for AND OR. I posted a http://code.djangoproject.com/ticket/1209"/>patch to ticket 1209 that does just this. I was hoping to start a bit of conversation here to see if others thought this might