gmba_django/gmba_django/urls.py

49 lines
2.4 KiB
Python
Raw Normal View History

2021-07-26 07:41:34 +00:00
"""gmba_django URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.2/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'))
"""
from django.contrib import admin
from django.urls import path
2021-07-27 08:13:27 +00:00
from django.views.generic import TemplateView
2021-07-28 11:48:27 +00:00
from app.views import (
HomePageView, OfflinePageView, send_from_file, DemoPageView, ConfigurationPageView, get_progress, UploadView,
ReindexPageView, RefreshPageView, ConfigurationHomePageView, SearchView, PeopleDetailView, TaxaListView,
FieldsListView, RangesListView, ResourceListView, PeopleListView
2021-07-28 11:48:27 +00:00
)
2021-07-27 08:13:27 +00:00
FILTER_QUERIES = [ 'country', 'range', 'field', 'taxon' ]
2021-07-26 07:41:34 +00:00
urlpatterns = [
path('', HomePageView.as_view(), name='home'),
2021-07-28 04:20:54 +00:00
path('offline/', OfflinePageView.as_view(), name='offline'),
2021-07-28 11:48:27 +00:00
path('geodata/<path:filename>/', send_from_file, name='send_geodata_file'),
path('data/<path:filename>', send_from_file, name='send_data_file'),
2021-07-28 04:20:54 +00:00
path('demo/', DemoPageView.as_view(), name='demo'),
2021-07-28 07:13:08 +00:00
path('admin/', admin.site.urls, name='admin'),
2021-07-28 13:46:57 +00:00
path('config-home/', ConfigurationHomePageView.as_view(), name='config_home'),
2021-07-28 07:13:08 +00:00
path('config/', ConfigurationPageView.as_view(), name='config'),
2021-07-28 11:48:27 +00:00
path('upload', UploadView.as_view(), name='upload'),
path('progress', get_progress, name='progress'),
path('reindex', ReindexPageView.as_view(), name='reindex'),
path('refresh', RefreshPageView.as_view(), name='refresh'),
2021-08-31 14:52:41 +00:00
path('api/search', SearchView.as_view(), name='api-search'),
2021-08-31 15:10:24 +00:00
path('api/people/<int:people_id>', PeopleDetailView.as_view(), name='api-people-detail'),
path('api/taxa', TaxaListView.as_view(), name='api-taxa-list'),
path('api/fields', FieldsListView.as_view(), name='api-field-list'),
path('api/ranges', RangesListView.as_view(), name='api-range-list'),
path('api/resources', ResourceListView.as_view(), name='api-resource-list'),
path('api/people', PeopleListView.as_view(), name='api-people-list'),
2021-07-26 07:41:34 +00:00
]