wcs/wcs/urls.py

67 lines
2.8 KiB
Python

# 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/>.
from django.conf.urls import url
from . import api, api_export_import, compat, views
from .statistics import views as statistics_views
urlpatterns = [
url(r'^robots.txt$', views.robots_txt),
url(r'^i18n\.js$', views.i18n_js),
url(r'^backoffice/', views.backoffice),
url(r'^__provision__/$', api.provisionning),
url(r'^api/export-import/$', api_export_import.index, name='api-export-import'),
url(r'^api/export-import/bundle-import/$', api_export_import.bundle_import),
url(
r'^api/export-import/(?P<objects>[\w-]+)/$',
api_export_import.objects_list,
name='api-export-import-objects-list',
),
url(
r'^api/export-import/(?P<objects>[\w-]+)/(?P<slug>[\w_-]+)/$',
api_export_import.object_export,
name='api-export-import-object-export',
),
url(
r'^api/export-import/(?P<objects>[\w-]+)/(?P<slug>[\w_-]+)/dependencies/$',
api_export_import.object_dependencies,
name='api-export-import-object-dependencies',
),
url(r'^api/validate-condition$', api.validate_condition, name='api-validate-condition'),
url(r'^api/validate-expression$', api.validate_expression, name='api-validate-expression'),
url(r'^api/reverse-geocoding$', api.reverse_geocoding, name='api-reverse-geocoding'),
url(r'^api/geocoding$', api.geocoding, name='api-geocoding'),
url(r'^api/statistics/$', statistics_views.IndexView.as_view()),
url(
r'^api/statistics/forms/count/$',
statistics_views.FormsCountView.as_view(),
name='api-statistics-forms-count',
),
url(
r'^api/statistics/cards/count/$',
statistics_views.CardsCountView.as_view(),
name='api-statistics-cards-count',
),
# provide django.contrib.auth view names for compatibility with
# templates created for classic django applications.
url(r'^login/$', compat.quixote, name='auth_login'),
url(r'^logout$', compat.quixote, name='auth_logout'),
]
# other URLs are handled by the quixote handler
urlpatterns.append(url(r'', compat.quixote, name='quixote'))