summaryrefslogtreecommitdiff
path: root/sublab_project/projects
diff options
context:
space:
mode:
Diffstat (limited to 'sublab_project/projects')
-rw-r--r--sublab_project/projects/urls.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/sublab_project/projects/urls.py b/sublab_project/projects/urls.py
new file mode 100644
index 0000000..788e18a
--- /dev/null
+++ b/sublab_project/projects/urls.py
@@ -0,0 +1,11 @@
+from django.conf.urls.defaults import patterns, include, url
+from django.views.generic import DetailView, ListView
+
+from projects.models import Project
+
+
+urlpatterns = patterns('',
+ url('^$', ListView.as_view(model=Project), name='projects_list'),
+ url('^(?P<slug>[-\w]+)/$', DetailView.as_view(model=Project),
+ name='projects_detail'),
+)