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_superuser or request.user == record.user %} display controls {% endif %} inside the loop. However, Django's default template language doesn't seem to support this basic syntax. Is there a non-hackish way to accomplish this with the default language? Regards, Chris --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---