Example #1
0
urlpatterns = patterns(
    '',
    url('^activities/$',
        BaseListView.as_view(
            groups=['Admin', 'Council'],
            model=Activity, create_object_url=reverse_lazy('create_activity')),
        name='list_activities'),
    url('^activities/new/$',
        BaseCreateView.as_view(
            groups=['Admin', 'Council'],
            model=Activity, form_class=ActivityForm,
            success_url=reverse_lazy('list_activities')),
        name='create_activity'),
    url('^activities/(?P<pk>\d+)/edit/$',
        BaseUpdateView.as_view(
            groups=['Admin', 'Council'],
            model=Activity, form_class=ActivityForm,
            success_url=reverse_lazy('list_activities')),
        name='edit_activity'),
    url('^initiatives/$',
        BaseListView.as_view(
            groups=['Admin', 'Council'],
            model=Campaign, create_object_url=reverse_lazy('create_campaign')),
        name='list_campaigns'),
    url('^initiatives/new/$',
        BaseCreateView.as_view(
            groups=['Admin', 'Council'],
            model=Campaign, form_class=CampaignForm,
            success_url=reverse_lazy('list_campaigns')),
        name='create_campaign'),
    url('^initiatives/(?P<pk>\d+)/edit/$',
        BaseUpdateView.as_view(
Example #2
0
 '',
 url('^activities/$',
     BaseListView.as_view(
         groups=['Admin', 'Council'],
         model=Activity,
         create_object_url=reverse_lazy('create_activity')),
     name='list_activities'),
 url('^activities/new/$',
     BaseCreateView.as_view(groups=['Admin', 'Council'],
                            model=Activity,
                            form_class=ActivityForm,
                            success_url=reverse_lazy('list_activities')),
     name='create_activity'),
 url('^activities/(?P<pk>\d+)/edit/$',
     BaseUpdateView.as_view(groups=['Admin', 'Council'],
                            model=Activity,
                            form_class=ActivityForm,
                            success_url=reverse_lazy('list_activities')),
     name='edit_activity'),
 url('^initiatives/$',
     BaseListView.as_view(
         groups=['Admin', 'Council'],
         model=Campaign,
         create_object_url=reverse_lazy('create_campaign')),
     name='list_campaigns'),
 url('^initiatives/new/$',
     BaseCreateView.as_view(groups=['Admin', 'Council'],
                            model=Campaign,
                            form_class=CampaignForm,
                            success_url=reverse_lazy('list_campaigns')),
     name='create_campaign'),
 url('^initiatives/(?P<pk>\d+)/edit/$',
Example #3
0
 url('^activities/$',
     BaseListView.as_view(
         model=Activity, create_object_url=reverse_lazy('create_activity')),
     name='list_activities'),
 url('^activities/(?P<pk>\d+)/delete/$',
     BaseDeleteView.as_view(
         model=Activity, success_url=reverse_lazy('list_activities')),
     name='delete_activity'),
 url('^activities/new/$',
     BaseCreateView.as_view(
         model=Activity, form_class=ActivityForm,
         success_url=reverse_lazy('list_activities')),
     name='create_activity'),
 url('^activities/(?P<pk>\d+)/edit/$',
     BaseUpdateView.as_view(
         model=Activity, form_class=ActivityForm,
         success_url=reverse_lazy('list_activities')),
     name='edit_activity'),
 url('^campaigns/$',
     BaseListView.as_view(
         model=Campaign, create_object_url=reverse_lazy('create_campaign')),
     name='list_campaigns'),
 url('^campaigns/(?P<pk>\d+)/delete/$',
     BaseDeleteView.as_view(
         model=Campaign, success_url=reverse_lazy('list_campaigns')),
     name='delete_campaign'),
 url('^campaigns/new/$',
     BaseCreateView.as_view(
         model=Campaign, form_class=CampaignForm,
         success_url=reverse_lazy('list_campaigns')),
     name='create_campaign'),