mirror of
https://github.com/penpot/penpot-admin.git
synced 2025-02-10 00:58:34 -05:00
21 lines
592 B
Python
21 lines
592 B
Python
import re
|
|
|
|
from django.conf import settings
|
|
from django.contrib import admin
|
|
from django.urls import path
|
|
from django.urls import re_path
|
|
from django.views.static import serve
|
|
from penpot_admin.penpot.admin import admin_site
|
|
|
|
def static(prefix, view=serve, **kwargs):
|
|
if not prefix:
|
|
raise ImproperlyConfigured("Empty static prefix not permitted")
|
|
|
|
return re_path(
|
|
r"^%s(?P<path>.*)$" % re.escape(prefix.lstrip("/")), view, kwargs=kwargs
|
|
)
|
|
|
|
urlpatterns = [
|
|
static(settings.STATIC_URL, document_root=settings.STATIC_ROOT),
|
|
path('admin/', admin_site.urls),
|
|
]
|