I have the following statement.
raise forms.ValidationError({'product_type':
[mark_safe('Product type <a href="/group/detail/%d/">N/A already exists</a> for this combination.' % na[0].product_group.id) ]})
This app has the following named url
url(r'^detail/(?P<pk>[0-9]+)/$', views.ProductGroupDetail.as_view(), name='group_detail'),
Is there a way to use {%url 'group_detail' %} format in the href rather than hard-coded urls?
Thanks.