mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-11-14 23:52:55 +11:00
Revert "Revert "add the posibility of specifying a url prefix"" (#206)
* Revert "Revert "add the posibility of specifying a url prefix (#143)" (#205)" * mysql client
This commit is contained in:
parent
5ec8e0507e
commit
51e9172479
3 changed files with 9 additions and 3 deletions
|
@ -51,6 +51,8 @@ MEDIA_ROOT = env("MEDIA_ROOT", ".media")
|
|||
|
||||
STATIC_URL = "/static/"
|
||||
|
||||
URL_PREFIX = env("URL_PREFIX", "")
|
||||
|
||||
ROOT_URLCONF = "dpaste.urls"
|
||||
|
||||
WSGI_APPLICATION = "dpaste.wsgi.application"
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
from django.urls import include, re_path
|
||||
from django.conf import settings
|
||||
|
||||
url_prefix = getattr(settings, "URL_PREFIX", "")
|
||||
|
||||
urlpatterns = [
|
||||
re_path(r"^", include("dpaste.urls.dpaste_api")),
|
||||
re_path(r"^", include("dpaste.urls.dpaste")),
|
||||
re_path(r"^i18n/", include("django.conf.urls.i18n")),
|
||||
re_path(r"^%s" % url_prefix, include("dpaste.urls.dpaste_api")),
|
||||
re_path(r"^%s" % url_prefix, include("dpaste.urls.dpaste")),
|
||||
re_path(r"^%si18n/" % url_prefix, include("django.conf.urls.i18n")),
|
||||
]
|
||||
|
||||
# Custom error handlers which load `dpaste/<code>.html` instead of `<code>.html`
|
||||
|
|
|
@ -31,6 +31,7 @@ install_requires =
|
|||
# Essential packages
|
||||
django>=3.2
|
||||
pygments>=2.11
|
||||
mysqlclient>=2.1.0
|
||||
django-staticinline>=1.0
|
||||
django-csp>=3.6
|
||||
dj_database_url>=0.5.0
|
||||
|
|
Loading…
Reference in a new issue