I am writing a view which is accepting a email as parameter passed by url like
url(r\'^admin/detail_consultant_service/((?P\\[A-Z0-9._%+-]+
You are passing a positional argument instead of a keyword argument. The following should work:
{% url consultant_service_detail consultant_id=consultant.id %}
Also if you are using Django>=1.5 you should use the url
as follows:
{% url 'consultant_service_detail' consultant_id=consultant.id %}
And since that is a new behavior, you can actually (which is recommended) use in in earlier versions of Django (I think >=1.3) by:
{% load url from future %}
{% url 'view_name' ... %}
The regex I think is fine according to here so the problem is most likely with the definition itself. Try this:
url(r'^admin/detail_consultant_service/(?P[\w.%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4})/$',
'admin_tool.views.consultant_service_detail',
name="consultant_service_detail"),
so a valid url will be similar to:
foo.com/admin/detail_consultant_service/email.address@here.com/