test/app/mfssogr/urls.py
zakhy 5069a82ae6 Merge branch 'Idealizm'
Докеризация

# Conflicts:
#	app/apps/events/views/views_events.py
#	app/apps/gto/migrations/0027_auto_20250721_2141.py
#	app/apps/gto/migrations/0028_alter_modeltypeicons_model.py
#	app/apps/gto/models/model_gto_external_system.py
#	app/apps/management/templates/gto_icons.html
#	app/apps/management/templates/icon_add.html
#	app/apps/management/templates/icons/remove_icon.html
#	app/apps/management/views/views_general.py
#	app/apps/management/views/views_geoproc.py
#	app/apps/management/views/views_gto.py
#	app/apps/management/views/views_pla.py
#	app/apps/management/views/views_seismicproc.py
#	app/apps/management/views/views_wklocation.py
#	app/mfssogr/urls.py
#	apps/management/templates/gto/gto_icons.html
#	apps/management/templates/gto/icon_add.html
#	apps/management/templates/gto_icons.html
#	apps/management/templates/icon_add.html
2025-07-24 15:23:47 +07:00

53 lines
1.8 KiB
Python

# -*- coding: utf-8 -*-
from django.conf import settings
from django.conf.urls import include
from django.conf.urls.static import static
from django.contrib import admin
from django.db import ProgrammingError
from django.urls import path
from django.views.generic import RedirectView
from apps.general.views import settingsmodule
from apps.util.map_api_key import get_api_key
from . import views
urlpatterns = [
path(
"favicon\.ico",
RedirectView.as_view(url="/static/img/favicon.ico"),
name="favicon",
),
path(
"", RedirectView.as_view(url="/main/", permanent=True)
), # Перенаправляет все запросы
path("admin/", admin.site.urls),
path("accounts/logout/", views.user_logout, name="user_logout"),
path("accounts/login/", views.user_login, name="user_login"),
path("main/", include("apps.main.urls")),
path("geoproc/", include("apps.geoproc.urls", namespace="geoproc")),
path("gto/", include("apps.gto.urls")),
path("seismicproc/", include("apps.seismicproc.urls")),
path("ogr/", include("apps.ogr.urls")),
path("pla/", include("apps.pla.urls")),
path("management/", include("apps.management.urls", namespace="management")),
path("wklocation/", include("apps.workerslocation.urls", namespace="workers_location")),
path("about/", include("apps.about.urls")),
path("events/", include('apps.events.urls')),
path("map_api_key/", get_api_key),
]
if settings.DEBUG:
urlpatterns += static(settings.DOWNLOAD_URL, document_root=settings.DOWNLOAD_ROOT)
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
try:
settingsmodule.settings_install()
if not settings.DEBUG:
from apps.schedulers import tasks
tasks.load_navigation()
tasks.load_earthquake()
except ProgrammingError:
pass