bgneal@45: """ bgneal@45: Urls for the news application. bgneal@45: bgneal@45: """ bgneal@66: from django.conf.urls import patterns, url bgneal@45: from django.views.generic import DetailView, ListView bgneal@45: bgneal@45: from news.models import News bgneal@45: bgneal@45: bgneal@45: urlpatterns = patterns('', bgneal@45: url(r'^$', bgneal@45: ListView.as_view( bgneal@45: model=News, bgneal@45: paginate_by=10, bgneal@45: context_object_name='news_list'), bgneal@45: name='news-index'), bgneal@45: url(r'^story/(?P\d+)/$', bgneal@45: DetailView.as_view(model=News, context_object_name='story'), bgneal@45: name='news-item') bgneal@45: )