2021-07-01 13:36:07 +02:00
|
|
|
"""konova URL Configuration
|
|
|
|
|
|
|
|
The `urlpatterns` list routes URLs to views. For more information please see:
|
|
|
|
https://docs.djangoproject.com/en/3.1/topics/http/urls/
|
|
|
|
Examples:
|
|
|
|
Function views
|
|
|
|
1. Add an import: from my_app import views
|
|
|
|
2. Add a URL to urlpatterns: path('', views.home, name='home')
|
|
|
|
Class-based views
|
|
|
|
1. Add an import: from other_app.views import Home
|
|
|
|
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
|
|
|
|
Including another URLconf
|
|
|
|
1. Import the include() function: from django.urls import include, path
|
|
|
|
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
|
|
|
"""
|
|
|
|
import debug_toolbar
|
|
|
|
from django.contrib import admin
|
|
|
|
from django.urls import path, include
|
|
|
|
|
|
|
|
from konova.settings import SSO_SERVER, SSO_PUBLIC_KEY, SSO_PRIVATE_KEY, DEBUG
|
2021-08-17 09:57:50 +02:00
|
|
|
from konova.sso.sso import KonovaSSOClient
|
2022-08-19 10:25:27 +02:00
|
|
|
from konova.views.logout import logout_view
|
|
|
|
from konova.views.geometry import get_geom_parcels, get_geom_parcels_content
|
|
|
|
from konova.views.home import home_view
|
2023-02-13 09:58:56 +01:00
|
|
|
from konova.views.map_proxy import ClientProxyParcelSearch, ClientProxyParcelWFS
|
2021-07-01 13:36:07 +02:00
|
|
|
|
2021-08-17 09:57:50 +02:00
|
|
|
sso_client = KonovaSSOClient(SSO_SERVER, SSO_PUBLIC_KEY, SSO_PRIVATE_KEY)
|
2021-07-01 13:36:07 +02:00
|
|
|
urlpatterns = [
|
|
|
|
path('admin/', admin.site.urls),
|
|
|
|
path('login/', include(sso_client.get_urls())),
|
|
|
|
path('logout/', logout_view, name="logout"),
|
|
|
|
path('', home_view, name="home"),
|
|
|
|
path('intervention/', include("intervention.urls")),
|
|
|
|
path('compensation/', include("compensation.urls")),
|
2021-08-19 13:02:31 +02:00
|
|
|
path('ema/', include("ema.urls")),
|
2021-07-08 11:07:33 +02:00
|
|
|
path('user/', include("user.urls")),
|
2021-07-06 08:53:08 +02:00
|
|
|
path('news/', include("news.urls")),
|
2021-10-18 15:52:51 +02:00
|
|
|
path('cl/', include("codelist.urls")),
|
|
|
|
path('analysis/', include("analysis.urls")),
|
2022-01-21 15:26:08 +01:00
|
|
|
path('api/', include("api.urls")),
|
2022-04-21 14:19:35 +02:00
|
|
|
path('geom/<id>/parcels/', get_geom_parcels, name="geometry-parcels"),
|
|
|
|
path('geom/<id>/parcels/<int:page>', get_geom_parcels_content, name="geometry-parcels-content"),
|
2023-02-13 09:58:56 +01:00
|
|
|
path('client/proxy', ClientProxyParcelSearch.as_view(), name="client-proxy-search"),
|
|
|
|
path('client/proxy/wfs', ClientProxyParcelWFS.as_view(), name="client-proxy-wfs"),
|
2021-07-01 13:36:07 +02:00
|
|
|
]
|
|
|
|
|
|
|
|
if DEBUG:
|
|
|
|
urlpatterns += [
|
|
|
|
path('__debug__/', include(debug_toolbar.urls)),
|
2022-01-12 16:45:55 +01:00
|
|
|
]
|
|
|
|
|
2022-08-19 10:25:27 +02:00
|
|
|
handler404 = "konova.views.error.get_404_view"
|
|
|
|
handler500 = "konova.views.error.get_500_view"
|