summaryrefslogtreecommitdiff
path: root/sublab_project/news/urls.py
blob: c8b1de56824117d411895573112484caa5aa6bbd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
from django.conf.urls.defaults import patterns, include, url
from django.views.generic import DetailView

from news.models import News
from news.feeds import NewsFeed, NewsFeedAtom
from news.views import NewsListView

urlpatterns = patterns('',
    url(r'^$', NewsListView.as_view(), name='news_list'),
    url(r'^rss/$', NewsFeed(), name='news_feed'),
    url(r'^atom/$', NewsFeedAtom(), name='news_feed_atom'),
    url(r'^(?P<slug>[-\w]+)/$', DetailView.as_view(model=News), name='news_detail'),
)