From 5ec8e0507eaecc31aa215e7fa1f0430d8cd6d929 Mon Sep 17 00:00:00 2001 From: Darren Date: Sun, 29 May 2022 09:40:46 -0400 Subject: [PATCH] Revert "add the posibility of specifying a url prefix (#143)" (#205) This reverts commit 5510329a99b56c254893c197f69fd928707bdf69. --- dpaste/settings/base.py | 2 -- dpaste/urls/__init__.py | 9 +++------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/dpaste/settings/base.py b/dpaste/settings/base.py index 3b61056..63db06f 100644 --- a/dpaste/settings/base.py +++ b/dpaste/settings/base.py @@ -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" diff --git a/dpaste/urls/__init__.py b/dpaste/urls/__init__.py index 13b925c..ad746cf 100644 --- a/dpaste/urls/__init__.py +++ b/dpaste/urls/__init__.py @@ -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/.html` instead of `.html`