Skip to content

Commit

Permalink
Add a url name property to the urlpattern generated
Browse files Browse the repository at this point in the history
  • Loading branch information
dulacp committed Dec 7, 2013
1 parent b622e45 commit 161c7fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pdfutils/sites.py
Expand Up @@ -185,7 +185,8 @@ def wrapper(*args, **kwargs):
# Add in each report's views.
for model_class, model_instance in six.iteritems(self._registry):
urlpatterns += patterns('',
url(r'^%s/' % model_instance.slug, model_class.as_view())
url(r'^%s/' % model_instance.slug, model_class.as_view(),
name='report__%s' % model_instance.slug)
)
return urlpatterns

Expand Down

0 comments on commit 161c7fc

Please sign in to comment.