bgneal@45: """ bgneal@45: Urls for the news application. bgneal@45: bgneal@45: """ bgneal@180: from django.conf.urls import url bgneal@45: from django.views.generic import DetailView, ListView bgneal@45: bgneal@45: from news.models import News bgneal@45: bgneal@45: bgneal@180: urlpatterns = [ 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@180: ]