from django.urls import path, include from rest_framework import routers from tasks.views import GoalManagerView, TaskManagerView, SubTaskManagerView urlpatterns = [ path('project/', GoalManagerView.as_view(), name='task'), path('project/<int:pk>', GoalManagerView.as_view(), name='task-update'), path('task/', TaskManagerView.as_view(), name='task'), path('task/<slug:slug>/', TaskManagerView.as_view(), name='create-task'), path('subtask/<slug:slug>/', SubTaskManagerView.as_view(), name='subtask'), ]
# GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # from django.conf.urls.defaults import * from parameters.views import ParameterManagerView from tasks.views import TaskManagerView import reversion urlpatterns = patterns( "tasks.views", url(r"^$", "tasks"), url( r"^task/(?P<pk>\d+)_(?P<method>\w+)/$", reversion.create_revision()(TaskManagerView.as_view()), name="task_manager", ), url(r"^taskexport/(\d+)/$", "task_export", name="task_export"), url(r"^taskimport/(\d+)/$", "task_import", name="task_import"), ) urlpatterns += patterns( "parameters.views", url( r"^task/(?P<task_id>\d+)/parameter/(?P<pk>\d+)_(?P<method>\w+)/$", ParameterManagerView.as_view(), name="parameter_manager", ), url(r"^task/(\d+)/parameter/add/$", "parameter_add", name="parameter_add"), )
name='monitoring_organization_import'), url(r'^(\d+)/parameter_export/$', 'monitoring_parameter_export', name='monitoring_parameter_export'), url(r'^(\d+)/parameter_filter/$', 'monitoring_parameter_filter', name='monitoring_parameter_filter'), url(r'^(\d+)/parameter_found_report/$', 'monitoring_parameter_found_report', name='monitoring_parameter_found_report'), url(r'^(\d+)/parameter_import/$', 'monitoring_parameter_import', name='monitoring_parameter_import'), url(r'^(\d+)/rating/$', 'monitoring_rating', name='monitoring_rating'), url(r'^(\d+)/set_npa_params/$', 'set_npa_params', name='set_npa_params'), url(r'^(?P<pk>\d+)_(?P<method>\w+)/$', MonitoringManagerView.as_view(), name='monitoring_manager'), ) urlpatterns += \ patterns('tasks.views', url(r'^(\d+)/mass_assign_tasks/$', 'task_mass_assign_tasks', name='task_mass_assign_tasks'), url(r'^(\d+)/organization/(\d+)/task/add/$', 'task_add', name='task_add'), url(r'^(?P<monitoring_id>\d+)/organization/(?P<organization_id>\d+)/task/(?P<pk>\d+)_(?P<method>\w+)/$', TaskManagerView.as_view(), name='task_manager'), url(r'^(\d+)/organization/(\d+)/tasks/$', 'tasks_by_monitoring_and_organization', name='tasks_by_monitoring_and_organization'), url(r'^(\d+)/task/add/$', 'task_add', name='task_add'), url(r'^(\d+)/tasks/$', 'tasks_by_monitoring', name='tasks_by_monitoring'), ) urlpatterns += \ patterns('organizations.views', url(r'^(?P<monitoring_id>\d+)/organization/(?P<pk>\d+)_(?P<method>\w+)/$', OrganizationManagerView.as_view(), name='organization_manager'), url(r'^(\d+)/organizations/$', 'organization_list', name='organization_list'), url(r'^(\d+)/organizations/$', 'organization_list', name='organization_list'), )
) monitoring_patterns += named_urls('questionnaire.views', (r'^(?P<monitoring_pk>\d+)/add_questionnaire/$', 'add_questionnaire'), (r'^(?P<monitoring_pk>\d+)/answers_export/$', 'answers_export', 'monitoring_answers_export'), ) monitoring_patterns += named_urls('', (r'^(?P<monitoring_pk>\d+)/claims/$', 'claims.views.claim_report'), (r'^(?P<monitoring_pk>\d+)/clarifications/$', 'clarifications.views.clarification_report'), ) tasks_patterns = named_urls('tasks.views', (r'^task/(?P<task_pk>\d+)_update/$', reversion.create_revision()(TaskManagerView.as_view()), 'task_update', {'method': 'update'}), (r'^task/(?P<task_pk>\d+)_delete/$', reversion.create_revision()(TaskManagerView.as_view()), 'task_delete', {'method': 'delete'}), (r'^taskexport/(?P<task_pk>\d+)/$', 'task_export'), (r'^taskimport/(?P<task_pk>\d+)/$', 'task_import'), ) tasks_patterns += named_urls('parameters.views', (r'^task/(?P<task_pk>\d+)/parameter/(?P<parameter_pk>\d+)_update/$', ParameterManagerView, 'parameter_update', {'method': 'update'}), (r'^task/(?P<task_pk>\d+)/parameter/(?P<parameter_pk>\d+)_delete/$', ParameterManagerView, 'parameter_delete', {'method': 'delete'}), (r'^task/(?P<task_pk>\d+)/parameter/(?P<parameter_pk>\d+)_exclude/$', ParameterManagerView, 'parameter_exclude', {'method': 'exclude'}), (r'^task/(?P<task_pk>\d+)/parameter/add/$', 'parameter_add',), )