mirror of
https://github.com/YunoHost-Apps/scovie_ynh.git
synced 2024-09-03 20:16:29 +02:00
21 lines
560 B
Python
21 lines
560 B
Python
"""
|
|
urls.py
|
|
"""
|
|
|
|
|
|
from django.conf import settings
|
|
from django.urls import include, path
|
|
from django.views.generic import RedirectView
|
|
|
|
|
|
if settings.PATH_URL:
|
|
# settings.PATH_URL is the $YNH_APP_ARG_PATH
|
|
# Prefix all urls with "PATH_URL":
|
|
urlpatterns = [
|
|
path('', RedirectView.as_view(url=f'{settings.PATH_URL}/')),
|
|
path(f'{settings.PATH_URL}/', include('scovie.urls')),
|
|
]
|
|
else:
|
|
# Installed to domain root, without a path prefix
|
|
# Just use the default project urls.py
|
|
from scovie.urls import urlpatterns # noqa
|