I have an url with an optionnal argument:
urlpatterns = patterns(
'my_app.views',
url('schedule/(?P<calendar_id>\d+)/(?:month(?P<relative_month>[\+,\-]\d)/)$',
'attribute_event',name='attribute_event')
)
In my template I have a link:
{% url attribute_event calendar.id %}
But I have an error saying the url can't be reversed with these args. Must I use 2 url regex entry and url names?!