aboutsummaryrefslogtreecommitdiffstats
path: root/examples/pygments_api/urls.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/pygments_api/urls.py')
-rw-r--r--examples/pygments_api/urls.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/pygments_api/urls.py b/examples/pygments_api/urls.py
index f96f4518..905e31c5 100644
--- a/examples/pygments_api/urls.py
+++ b/examples/pygments_api/urls.py
@@ -1,6 +1,7 @@
-from django.conf.urls.defaults import patterns
+from django.conf.urls.defaults import patterns, url
+from pygments_api.views import PygmentsRoot, PygmentsInstance
-urlpatterns = patterns('pygments_api.views',
- (r'^$', 'PygmentsRoot'),
- (r'^([a-zA-Z0-9-]+)/$', 'PygmentsInstance'),
+urlpatterns = patterns('',
+ url(r'^$', PygmentsRoot.as_view(), name='pygments-root'),
+ url(r'^([a-zA-Z0-9-]+)/$', PygmentsInstance.as_view(), name='pygments-instance'),
)