mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-11-23 11:56:36 +11:00
51e9172479
* Revert "Revert "add the posibility of specifying a url prefix (#143)" (#205)" * mysql client
14 lines
510 B
Python
14 lines
510 B
Python
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")),
|
|
]
|
|
|
|
# Custom error handlers which load `dpaste/<code>.html` instead of `<code>.html`
|
|
handler404 = "dpaste.views.handler404"
|
|
handler500 = "dpaste.views.handler500"
|