My experience is that using the the various conditional templatetags
is painful. I can never seem to do what I want, either because I'm
too much of a newbie or there is some gotcha such as "filters don't
work inside if" (I seem to remember something like that, but again, it
might just be my own p
On Sun, 2009-02-22 at 19:54 -0800, Chris wrote:
> Sorry, not sure how that happened. My browser wasn't even opened when
> those were sent.
>
> Anyways, thanks for the suggestion. However, nested if statements (why
> doesn't Django support elif?!)
Using "elif" wouldn't make things much simpler.
Sorry, not sure how that happened. My browser wasn't even opened when
those were sent.
Anyways, thanks for the suggestion. However, nested if statements (why
doesn't Django support elif?!) and multiple includes still seems very
awkward. I think I'll try using simple_tag to encapsulate my
permissi
On Sun, Feb 22, 2009 at 10:27 PM, Chris wrote:
>
> I'm displaying a list of records in a template. I want to
> conditionally display controls for each record if the current user is
> admin, or the user owns the given record (indicated by record.user ==
> request.user).
>
> What's the best way to
I'm displaying a list of records in a template. I want to
conditionally display controls for each record if the current user is
admin, or the user owns the given record (indicated by record.user ==
request.user).
What's the best way to do this? Logically, all I want to do is {% if
request.user.is
On Sun, Feb 22, 2009 at 10:13 PM, Chris wrote:
>
> I'm displaying a list of records in a template. I want to
> conditionally display controls for each record if the current user is
> admin, or the user owns the given record (indicated by record.user ==
> request.user).
>
> What's the best way to
I'm displaying a list of records in a template. I want to
conditionally display controls for each record if the current user is
admin, or the user owns the given record (indicated by record.user ==
request.user).
What's the best way to do this? Logically, all I want to do is {% if
request.user.is
I'm displaying a list of records in a template. I want to
conditionally display controls for each record if the current user is
admin, or the user owns the given record (indicated by record.user ==
request.user).
What's the best way to do this? Logically, all I want to do is {% if
request.user.is
8 matches
Mail list logo