I have a URL conf such as this:
url(r'^value-toggle/(?P<profile_id>\d{1,10})/(?P<on_or_off>on|off)/$',
'clipfo.profile.views.value_toggle',
name='value-toggle'),
In my template, I am trying to link to it:
<a href="{% url value-toggle profile_id=profile.id on_or_off='off' %}">Turn off</a>.
I get the following error when viewing the page which contains the url tag:
Caught NoReverseMatch while rendering: Reverse for 'value-toggle' with arguments '()' and keyword arguments '{'profile_id': 5, 'on_or_off': '### FIX ME - bad template variable ###'}' not found.
Please note that "### FIX ME - bad template variable ###" is my TEMPLATE_STRING_IF_INVALID
value.
How can i pass a literal "off" as the value of named param on_or_off
to the url
django template tag?