bgneal@323: """ bgneal@323: urls.py - URLs for the ygroup application. bgneal@323: bgneal@323: """ bgneal@323: from django.conf.urls.defaults import * bgneal@323: from django.views.generic import ListView, DetailView bgneal@323: bgneal@323: from ygroup.models import Thread, Post bgneal@323: from ygroup.views import ThreadIndexView, ThreadView bgneal@323: bgneal@323: bgneal@323: urlpatterns = patterns('', bgneal@323: url(r'^threads/$', bgneal@323: ThreadIndexView.as_view(), bgneal@323: name='ygroup-thread_index'), bgneal@323: url(r'^thread/(\d+)/$', bgneal@323: ThreadView.as_view(), bgneal@323: name='ygroup-thread_view'), bgneal@323: url(r'^post/(?P\d+)/$', bgneal@323: DetailView.as_view(model=Post, context_object_name='post'), bgneal@323: name='ygroup-post_view'), bgneal@323: ) bgneal@323: