All pastes #125240 Raw Edit

Someone

public text v1 · immutable
·published 2006-08-10 14:24 UTC
rendered paste body
from django.conf.urls.defaults import *
from localmachine.simpleforums.models import Post

info_dict = {
    'queryset': Post.objects.all(),
}


save_dict = { 'model' : Post , 'post_save_redirect' : '/forums/' }


urlpatterns = patterns('',
    # Example:
    # (r'^localmachine/', include('localmachine.apps.foo.urls.foo')),
        # (r'^polls/(?P<poll_id>\d+)/$', 'mysite.polls.views.detail'),

        # this should show the latest X polls.
        (r'^$', 'django.views.generic.list_detail.object_list', info_dict ) ,

        # view the thread
        (r'^(?P<thread_id>\d+)/$', 'localmachine.simpleforums.views.viewthread' , save_dict ),

        # save post (GAH! )
        (r'^(\d+)/reply/$', 'django.views.generic.create_update.create_object' )

)