Class based views
* refactors method based views for parcel fetching, home and logout to class based
This commit is contained in:
+8
-8
@@ -19,17 +19,17 @@ from django.urls import path, include
|
||||
|
||||
from konova.settings import SSO_SERVER, SSO_PUBLIC_KEY, SSO_PRIVATE_KEY, DEBUG
|
||||
from konova.sso.sso import KonovaSSOClient
|
||||
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
|
||||
from konova.views.logout import LogoutView
|
||||
from konova.views.geometry import GeomParcelsView, GeomParcelsContentView
|
||||
from konova.views.home import HomeView
|
||||
from konova.views.map_proxy import ClientProxyParcelSearch, ClientProxyParcelWFS
|
||||
|
||||
sso_client = KonovaSSOClient(SSO_SERVER, SSO_PUBLIC_KEY, SSO_PRIVATE_KEY)
|
||||
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('logout/', LogoutView.as_view(), name="logout"),
|
||||
path('', HomeView.as_view(), name="home"),
|
||||
path('intervention/', include("intervention.urls")),
|
||||
path('compensation/', include("compensation.urls")),
|
||||
path('ema/', include("ema.urls")),
|
||||
@@ -38,8 +38,8 @@ urlpatterns = [
|
||||
path('cl/', include("codelist.urls")),
|
||||
path('analysis/', include("analysis.urls")),
|
||||
path('api/', include("api.urls")),
|
||||
path('geom/<id>/parcels/', get_geom_parcels, name="geometry-parcels"),
|
||||
path('geom/<id>/parcels/<int:page>', get_geom_parcels_content, name="geometry-parcels-content"),
|
||||
path('geom/<id>/parcels/', GeomParcelsView.as_view(), name="geometry-parcels"),
|
||||
path('geom/<id>/parcels/<int:page>', GeomParcelsContentView.as_view(), name="geometry-parcels-content"),
|
||||
path('client/proxy', ClientProxyParcelSearch.as_view(), name="client-proxy-search"),
|
||||
path('client/proxy/wfs', ClientProxyParcelWFS.as_view(), name="client-proxy-wfs"),
|
||||
]
|
||||
@@ -50,4 +50,4 @@ if DEBUG:
|
||||
]
|
||||
|
||||
handler404 = "konova.views.error.get_404_view"
|
||||
handler500 = "konova.views.error.get_500_view"
|
||||
handler500 = "konova.views.error.get_500_view"
|
||||
|
||||
Reference in New Issue
Block a user