Пример #1
0
    url(r'^jobs/?$', ListView.as_view(queryset=Job.objects.all()), name='job-list'),
    url(r'^jobs/(?P<pk>\d+)/(?P<status>[a-zA-Z_ ]+)?/?$',
        JobDetailedListView.as_view(template_name='core/job_detail.html'),
        name='job-detail'),
    url(r'^jobs/create/?$',
        CreateView.as_view(queryset=Job.objects.all(),
                           template_name='core/generic_form.html',
                           form_class=JobForm),
        name='job-create'),
    url(r'^jobs/update/(?P<pk>\d+)/?$',
        UpdateView.as_view(queryset=Job.objects.all(),
                           template_name='core/generic_form.html',
                           form_class=JobForm),
        name='job-update'),
    url(r'^jobs/(?P<job_pk>\d+)/batch-create-aois/?$',
        BatchCreateAOIS.as_view(),
        name='job-batch-create-aois'),

    # AOIS
    url(r'^aois/work/(?P<pk>\d+)/?$', CreateFeaturesView.as_view(), name='aoi-work'),
    url(r'^aois/update-status/(?P<pk>\d+)/(?P<status>Unassigned|Assigned|In work|Submitted|Completed)/?$',
        ChangeAOIStatus.as_view(), name="aoi-update-status"),
    url(r'^aois/create/?$',
        CreateView.as_view(queryset=AOI.objects.all(),
                           template_name='core/generic_form.html',
                           form_class=AOIForm),
        name='aoi-create'),
    url(r'^aois/update/(?P<pk>\d+)/?$',
        UpdateView.as_view(queryset=AOI.objects.all(),
                           template_name='core/generic_form.html',
                           form_class=AOIForm),
Пример #2
0
Файл: urls.py Проект: pamyx/geoq
        login_required(
            CreateJobView.as_view(queryset=Job.objects.all(),
                                  template_name='core/generic_form.html',
                                  form_class=JobForm)),
        name='job-create'),
    url(r'^jobs/update/(?P<pk>\d+)/?$',
        login_required(
            UpdateView.as_view(queryset=Job.objects.all(),
                               template_name='core/generic_form.html',
                               form_class=JobForm)),
        name='job-update'),
    url(r'^jobs/delete/(?P<pk>\d+)/?$',
        login_required(JobDelete.as_view()),
        name='job-delete'),
    url(r'^jobs/(?P<job_pk>\d+)/create-aois/?$',
        login_required(BatchCreateAOIS.as_view()),
        name='job-create-aois'),
    url(
        r'^jobs/(?P<job_pk>\d+)/batch-create-aois/?$',
        #login required set in views
        'core.views.batch_create_aois',
        name='job-batch-create-aois'),

    # AOIS
    url(r'^aois/(?P<status>[a-zA-Z_ ]+)?/?$',
        AOIDetailedListView.as_view(template_name='core/aoi_list.html'),
        name='aoi-list'),
    url(r'^aois/work/(?P<pk>\d+)/?$',
        login_required(CreateFeaturesView.as_view()),
        name='aoi-work'),
    url(r'^aois/update-status/(?P<pk>\d+)/(?P<status>Unassigned|Assigned|In work|Submitted|Completed)/?$',
Пример #3
0
    url(r'^jobs/(?P<pk>\d+)/next-aoi', redirect_to_unassigned_aoi, name='job-next-aoi'),
    url(r'^jobs/create/?$',
        login_required(CreateJobView.as_view(queryset=Job.objects.all(),
                           template_name='core/generic_form.html',
                           form_class=JobForm)),
        name='job-create'),
    url(r'^jobs/update/(?P<pk>\d+)/?$',
        login_required(UpdateView.as_view(queryset=Job.objects.all(),
                           template_name='core/generic_form.html',
                           form_class=JobForm)),
        name='job-update'),
    url(r'^jobs/delete/(?P<pk>\d+)/?$',
        login_required(JobDelete.as_view()),
        name='job-delete'),
    url(r'^jobs/(?P<job_pk>\d+)/create-aois/?$',
        login_required(BatchCreateAOIS.as_view()),
        name='job-create-aois'),

    url(r'^jobs/(?P<job_pk>\d+)/batch-create-aois/?$',
        #login required set in views
        'core.views.batch_create_aois', name='job-batch-create-aois'),

    # AOIS
    url(r'^aois/(?P<status>[a-zA-Z_ ]+)?/?$', AOIDetailedListView.as_view(template_name='core/aoi_list.html'), name='aoi-list'),
    url(r'^aois/work/(?P<pk>\d+)/?$',
        login_required(CreateFeaturesView.as_view()), name='aoi-work'),
    url(r'^aois/update-status/(?P<pk>\d+)/(?P<status>Unassigned|Assigned|In work|In review|Completed)/?$', login_required(
        ChangeAOIStatus.as_view()),
        name="aoi-update-status"),
    url(r'^aois/create/?$', login_required(
        CreateView.as_view(queryset=AOI.objects.all(),