2023-05-26 19:09:08 +02:00
|
|
|
"""
|
|
|
|
urls.py
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
|
|
from django.conf import settings
|
|
|
|
from django.urls import include, path
|
|
|
|
from django.views.generic import RedirectView
|
|
|
|
|
|
|
|
|
2024-01-18 13:19:08 +01:00
|
|
|
if settings.PATH:
|
|
|
|
# settings.PATH is the $YNH_APP_ARG_PATH
|
|
|
|
# Prefix all urls with "PATH":
|
2023-05-26 19:09:08 +02:00
|
|
|
urlpatterns = [
|
2024-01-18 13:19:08 +01:00
|
|
|
path('', RedirectView.as_view(url=f'{settings.PATH}/')),
|
|
|
|
path(f'{settings.PATH}/', include('scovie.urls')),
|
2023-05-26 19:09:08 +02:00
|
|
|
]
|
|
|
|
else:
|
|
|
|
# Installed to domain root, without a path prefix
|
|
|
|
# Just use the default project urls.py
|
2023-05-26 23:07:02 +02:00
|
|
|
from scovie.urls import urlpatterns # noqa
|