14 |
14 |
# You should have received a copy of the GNU General Public License
|
15 |
15 |
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
16 |
16 |
|
17 |
|
from django.conf.urls import url
|
|
17 |
from django.urls import path, re_path
|
18 |
18 |
|
19 |
19 |
from . import api, api_export_import, compat, views
|
20 |
20 |
from .statistics import views as statistics_views
|
21 |
21 |
|
22 |
22 |
urlpatterns = [
|
23 |
|
url(r'^robots.txt$', views.robots_txt),
|
24 |
|
url(r'^i18n\.js$', views.i18n_js),
|
25 |
|
url(r'^backoffice/', views.backoffice),
|
26 |
|
url(r'^__provision__/$', api.provisionning),
|
27 |
|
url(r'^api/export-import/$', api_export_import.index, name='api-export-import'),
|
28 |
|
url(r'^api/export-import/bundle-import/$', api_export_import.bundle_import),
|
29 |
|
url(
|
|
23 |
re_path(r'^robots.txt$', views.robots_txt),
|
|
24 |
re_path(r'^i18n\.js$', views.i18n_js),
|
|
25 |
re_path(r'^backoffice/', views.backoffice),
|
|
26 |
path('__provision__/', api.provisionning),
|
|
27 |
path('api/export-import/', api_export_import.index, name='api-export-import'),
|
|
28 |
path('api/export-import/bundle-import/', api_export_import.bundle_import),
|
|
29 |
re_path(
|
30 |
30 |
r'^api/export-import/(?P<objects>[\w-]+)/$',
|
31 |
31 |
api_export_import.objects_list,
|
32 |
32 |
name='api-export-import-objects-list',
|
33 |
33 |
),
|
34 |
|
url(
|
|
34 |
re_path(
|
35 |
35 |
r'^api/export-import/(?P<objects>[\w-]+)/(?P<slug>[\w_-]+)/$',
|
36 |
36 |
api_export_import.object_export,
|
37 |
37 |
name='api-export-import-object-export',
|
38 |
38 |
),
|
39 |
|
url(
|
|
39 |
re_path(
|
40 |
40 |
r'^api/export-import/(?P<objects>[\w-]+)/(?P<slug>[\w_-]+)/dependencies/$',
|
41 |
41 |
api_export_import.object_dependencies,
|
42 |
42 |
name='api-export-import-object-dependencies',
|
43 |
43 |
),
|
44 |
|
url(r'^api/validate-condition$', api.validate_condition, name='api-validate-condition'),
|
45 |
|
url(r'^api/validate-expression$', api.validate_expression, name='api-validate-expression'),
|
46 |
|
url(r'^api/reverse-geocoding$', api.reverse_geocoding, name='api-reverse-geocoding'),
|
47 |
|
url(r'^api/geocoding$', api.geocoding, name='api-geocoding'),
|
48 |
|
url(r'^api/statistics/$', statistics_views.IndexView.as_view()),
|
49 |
|
url(
|
50 |
|
r'^api/statistics/forms/count/$',
|
|
44 |
path('api/validate-condition', api.validate_condition, name='api-validate-condition'),
|
|
45 |
path('api/validate-expression', api.validate_expression, name='api-validate-expression'),
|
|
46 |
path('api/reverse-geocoding', api.reverse_geocoding, name='api-reverse-geocoding'),
|
|
47 |
path('api/geocoding', api.geocoding, name='api-geocoding'),
|
|
48 |
path('api/statistics/', statistics_views.IndexView.as_view()),
|
|
49 |
path(
|
|
50 |
'api/statistics/forms/count/',
|
51 |
51 |
statistics_views.FormsCountView.as_view(),
|
52 |
52 |
name='api-statistics-forms-count',
|
53 |
53 |
),
|
54 |
|
url(
|
55 |
|
r'^api/statistics/cards/count/$',
|
|
54 |
path(
|
|
55 |
'api/statistics/cards/count/',
|
56 |
56 |
statistics_views.CardsCountView.as_view(),
|
57 |
57 |
name='api-statistics-cards-count',
|
58 |
58 |
),
|
59 |
59 |
# provide django.contrib.auth view names for compatibility with
|
60 |
60 |
# templates created for classic django applications.
|
61 |
|
url(r'^login/$', compat.quixote, name='auth_login'),
|
62 |
|
url(r'^logout$', compat.quixote, name='auth_logout'),
|
|
61 |
path('login/', compat.quixote, name='auth_login'),
|
|
62 |
path('logout', compat.quixote, name='auth_logout'),
|
63 |
63 |
]
|
64 |
64 |
|
65 |
65 |
# other URLs are handled by the quixote handler
|
66 |
|
urlpatterns.append(url(r'', compat.quixote, name='quixote'))
|
|
66 |
urlpatterns.append(re_path(r'', compat.quixote, name='quixote'))
|
67 |
|
-
|