2013-12-07 17:24:11 +01:00
|
|
|
# w.c.s. - web application for online forms
|
|
|
|
# Copyright (C) 2005-2013 Entr'ouvert
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
2017-09-09 16:19:13 +02:00
|
|
|
from django.urls import path, re_path
|
2013-12-07 17:24:11 +01:00
|
|
|
|
2021-12-31 14:59:14 +01:00
|
|
|
from . import api, api_export_import, compat, views
|
2021-04-04 15:11:08 +02:00
|
|
|
from .statistics import views as statistics_views
|
2018-01-01 12:38:41 +01:00
|
|
|
|
2017-09-09 16:19:13 +02:00
|
|
|
urlpatterns = [
|
2020-04-13 10:08:30 +02:00
|
|
|
re_path(r'^robots.txt$', views.robots_txt),
|
2021-12-18 22:56:40 +01:00
|
|
|
re_path(r'^i18n\.js$', views.i18n_js),
|
2018-01-01 12:38:41 +01:00
|
|
|
re_path(r'^backoffice/', views.backoffice),
|
2020-05-25 21:57:31 +02:00
|
|
|
path('__provision__/', api.provisionning),
|
2021-12-31 14:59:14 +01:00
|
|
|
path('api/export-import/', api_export_import.index, name='api-export-import'),
|
2023-08-04 10:28:27 +02:00
|
|
|
path('api/export-import/bundle-check/', api_export_import.bundle_check),
|
2021-12-31 14:59:14 +01:00
|
|
|
path('api/export-import/bundle-import/', api_export_import.bundle_import),
|
2023-02-20 10:12:07 +01:00
|
|
|
path('api/export-import/bundle-declare/', api_export_import.bundle_declare),
|
2023-02-20 15:52:43 +01:00
|
|
|
path('api/export-import/unlink/', api_export_import.unlink),
|
2021-12-31 14:59:14 +01:00
|
|
|
re_path(
|
|
|
|
r'^api/export-import/(?P<objects>[\w-]+)/$',
|
|
|
|
api_export_import.objects_list,
|
|
|
|
name='api-export-import-objects-list',
|
|
|
|
),
|
|
|
|
re_path(
|
|
|
|
r'^api/export-import/(?P<objects>[\w-]+)/(?P<slug>[\w_-]+)/$',
|
|
|
|
api_export_import.object_export,
|
|
|
|
name='api-export-import-object-export',
|
|
|
|
),
|
|
|
|
re_path(
|
|
|
|
r'^api/export-import/(?P<objects>[\w-]+)/(?P<slug>[\w_-]+)/dependencies/$',
|
|
|
|
api_export_import.object_dependencies,
|
|
|
|
name='api-export-import-object-dependencies',
|
|
|
|
),
|
2022-10-24 16:17:34 +02:00
|
|
|
re_path(
|
|
|
|
r'^api/export-import/(?P<objects>[\w-]+)/(?P<slug>[\w_-]+)/redirect/$',
|
|
|
|
api_export_import.object_redirect,
|
|
|
|
name='api-export-import-object-redirect',
|
|
|
|
),
|
2018-04-07 09:24:51 +02:00
|
|
|
path('api/validate-condition', api.validate_condition, name='api-validate-condition'),
|
|
|
|
path('api/reverse-geocoding', api.reverse_geocoding, name='api-reverse-geocoding'),
|
2019-04-13 18:06:02 +02:00
|
|
|
path('api/geocoding', api.geocoding, name='api-geocoding'),
|
2021-04-04 15:11:08 +02:00
|
|
|
path('api/statistics/', statistics_views.IndexView.as_view()),
|
|
|
|
path(
|
|
|
|
'api/statistics/forms/count/',
|
|
|
|
statistics_views.FormsCountView.as_view(),
|
|
|
|
name='api-statistics-forms-count',
|
|
|
|
),
|
2022-05-03 20:05:06 +02:00
|
|
|
path(
|
|
|
|
'api/statistics/cards/count/',
|
|
|
|
statistics_views.CardsCountView.as_view(),
|
|
|
|
name='api-statistics-cards-count',
|
|
|
|
),
|
2022-12-05 18:26:56 +01:00
|
|
|
path(
|
|
|
|
'api/statistics/resolution-time/',
|
|
|
|
statistics_views.ResolutionTimeView.as_view(),
|
|
|
|
name='api-statistics-resolution-time',
|
|
|
|
),
|
2023-01-04 13:25:23 +01:00
|
|
|
path(
|
|
|
|
'api/statistics/resolution-time-cards/',
|
|
|
|
statistics_views.CardsResolutionTimeView.as_view(),
|
|
|
|
name='api-statistics-resolution-time-cards',
|
|
|
|
),
|
2018-02-26 12:49:09 +01:00
|
|
|
# provide django.contrib.auth view names for compatibility with
|
|
|
|
# templates created for classic django applications.
|
|
|
|
path('login/', compat.quixote, name='auth_login'),
|
|
|
|
path('logout', compat.quixote, name='auth_logout'),
|
2017-09-09 16:19:13 +02:00
|
|
|
]
|
2017-03-05 20:22:34 +01:00
|
|
|
|
|
|
|
# other URLs are handled by the quixote handler
|
2018-01-01 12:38:41 +01:00
|
|
|
urlpatterns.append(re_path(r'', compat.quixote, name='quixote'))
|