summaryrefslogtreecommitdiff
path: root/sublab_project/projects/urls.py
blob: f3e4f61d0ed7c1ae52475e8ef11eeb774c76c8b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from django.conf.urls.defaults import patterns, include, url
from django.views.generic import DetailView, ListView

from projects.models import Project
from projects.feeds import ProjectNewsFeed, ProjectNewsFeedAtom, ProjectFeed, ProjectFeedAtom

urlpatterns = patterns('',
    url('^$', ListView.as_view(model=Project), name='projects_list'),
    url('^rss/$', ProjectFeed()),
    url('^atom/$', ProjectFeedAtom()),
    url('^(?P<slug>[-\w]+)/$', DetailView.as_view(model=Project),
        name='projects_detail'),
    url(r'^(?P<slug>[-\w]+)/image/$',
        DetailView.as_view(model=Project,
            template_name='projects/project_image.html'),
        name='project_image'),
    url('^(?P<slug>[-\w]+)/rss/$', ProjectNewsFeed()),
    url('^(?P<slug>[-\w]+)/atom/$', ProjectNewsFeedAtom()),
)