Re: custom if tag

2013-09-28 Thread Vibhu Rishi
Hi Alagappan, The assignment_tag worked perfectly for me ! Thanks! Vibhu On Tue, Sep 24, 2013 at 1:01 AM, Alagappan wrote: > You can implement has_applied as a filter instead of a template tag. > https://docs.djangoproject.com/en/dev/howto/custom-template-tags/#writing-custom-template-filters

Re: custom if tag

2013-09-23 Thread Alagappan
You can implement has_applied as a filter instead of a template tag. https://docs.djangoproject.com/en/dev/howto/custom-template-tags/#writing-custom-template-filters Haven't check it, but something like {% if user|has_applied_filter: opening %} should essentially work out for your case. Another

custom if tag

2013-09-23 Thread Vibhu Rishi
Hi, My scenario is that users would have applied for some job opening. I need to do something like the following in my templates : {% if has_applied opening user %} You have applied {% else %} Click to apply {% endif %} However, so far i have been using templatetags and got the following only: {