from django.conf.urls.defaults import patterns, url from django.contrib.auth.decorators import login_required from django.views.generic.detail import DetailView from views import DecisionCreate, DecisionUpdate, \ DecisionDetail, DecisionList, \ ExportCSV, FeedbackCreate, \ FeedbackSnippetCreate, FeedbackUpdate, \ OrganizationRedirectView from models import Feedback urlpatterns = patterns( 'econsensus.publicweb.views', url(r'^(?P<org_slug>[-\w]+)/export_csv/$', ExportCSV.as_view(), name='publicweb_export_csv'), #Feedback urls... url(r'^feedback/create/(?P<parent_pk>[\d]+)/$', FeedbackCreate.as_view(template_name='feedback_update_page.html'), name='publicweb_feedback_create'), url(r'^feedback/update/(?P<pk>[\d]+)/$', FeedbackUpdate.as_view(template_name='feedback_update_page.html'), name='publicweb_feedback_update'), url(r'^feedback/detail/(?P<pk>[\d]+)/$', login_required( DetailView.as_view(model=Feedback, template_name='feedback_detail_page.html')), name='publicweb_feedback_detail'), #snippets
ExportCSV, FeedbackCreate, \ FeedbackSnippetCreate, FeedbackUpdate from models import Decision, Feedback feedback_update_info = {'model' : Feedback, 'template_name': 'feedback_update_page.html' } feedback_snippet_update_info = {'model' : Feedback, 'template_name': 'feedback_update_snippet.html' } urlpatterns = patterns('econsensus.publicweb.views', url(r'^export_csv/$', ExportCSV.as_view(), name='publicweb_export_csv'), #Feedback urls... url(r'^feedback/create/(?P<parent_pk>[\d]+)/$', FeedbackCreate.as_view(template_name = 'feedback_update_page.html'), name='publicweb_feedback_create'), url(r'^feedback/update/(?P<pk>[\d]+)/$', FeedbackUpdate.as_view(template_name = 'feedback_update_page.html'), name='publicweb_feedback_update'), url(r'^feedback/detail/(?P<pk>[\d]+)/$', login_required(DetailView.as_view( model = Feedback, template_name = 'feedback_detail_page.html')), name='publicweb_feedback_detail'), #snippets