Revert "add the posibility of specifying a url prefix (#143)" (#205)

This reverts commit 5510329a99.
This commit is contained in:
Darren 2022-05-29 09:40:46 -04:00 committed by GitHub
parent 5510329a99
commit 5ec8e0507e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 8 deletions

View file

@ -51,8 +51,6 @@ MEDIA_ROOT = env("MEDIA_ROOT", ".media")
STATIC_URL = "/static/"
URL_PREFIX = env("URL_PREFIX", "")
ROOT_URLCONF = "dpaste.urls"
WSGI_APPLICATION = "dpaste.wsgi.application"

View file

@ -1,12 +1,9 @@
from django.urls import include, re_path
from django.conf import settings
url_prefix = getattr(settings, "URL_PREFIX", "")
urlpatterns = [
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")),
re_path(r"^", include("dpaste.urls.dpaste_api")),
re_path(r"^", include("dpaste.urls.dpaste")),
re_path(r"^i18n/", include("django.conf.urls.i18n")),
]
# Custom error handlers which load `dpaste/<code>.html` instead of `<code>.html`