bgneal@47: """ bgneal@47: Urls for the articles application. bgneal@47: bgneal@47: """ bgneal@66: from django.conf.urls import patterns, url bgneal@47: from django.views.generic import DetailView, ListView bgneal@47: bgneal@47: from articles.models import Article bgneal@47: bgneal@47: bgneal@47: urlpatterns = patterns('', bgneal@47: url(r'^$', bgneal@47: ListView.as_view( bgneal@47: model=Article, bgneal@47: context_object_name='article_list'), bgneal@47: name='articles-index'), bgneal@47: url(r'^(?P\d+)/$', bgneal@47: DetailView.as_view(model=Article, context_object_name='article'), bgneal@47: name='articles-item') bgneal@47: )