Exemple #1
0
from django.core.urlresolvers import reverse_lazy

from remo.base.views import BaseCreateView, BaseListView, BaseUpdateView
from remo.events.models import EventMetric
from remo.events.forms import EventMetricForm
from remo.profiles.forms import FunctionalAreaForm
from remo.profiles.models import FunctionalArea
from remo.reports.forms import ActivityForm, CampaignForm
from remo.reports.models import Activity, Campaign


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/$',
Exemple #2
0
from django.conf.urls import patterns, url
from django.core.urlresolvers import reverse_lazy

from remo.base.views import BaseCreateView, BaseListView, BaseUpdateView
from remo.events.models import EventMetric
from remo.events.forms import EventMetricForm
from remo.profiles.forms import FunctionalAreaForm, MobilisingSkillForm, MobilisingInterestForm
from remo.profiles.models import FunctionalArea, MobilisingSkill, MobilisingInterest
from remo.reports.forms import ActivityForm, CampaignForm
from remo.reports.models import Activity, Campaign

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/$',
Exemple #3
0
from django.conf.urls.defaults import patterns, url
from django.core.urlresolvers import reverse_lazy

from remo.base.views import (BaseCreateView, BaseDeleteView, BaseListView,
                             BaseUpdateView)
from remo.profiles.forms import FunctionalAreaForm
from remo.profiles.models import FunctionalArea
from remo.reports.forms import ActivityForm, CampaignForm
from remo.reports.models import Activity, Campaign


urlpatterns = patterns(
    '',
    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'),