1
0
의 미러 https://github.com/etesync/server synced 2025-07-02 05:12:33 +00:00

fix: remove obsolete static file handler

This commit is contained in:
Xiretza 2022-05-09 16:37:03 +02:00 committed by Tom Hacohen
부모 e635e081c7
커밋 13a137a128

파일 보기

@ -2,7 +2,7 @@ import os
from django.conf import settings
from django.contrib import admin
from django.urls import path, re_path
from django.urls import path
from django.views.generic import TemplateView
from django.views.static import serve
from django.contrib.staticfiles import finders
@ -11,14 +11,3 @@ urlpatterns = [
path("admin/", admin.site.urls),
path("", TemplateView.as_view(template_name="success.html")),
]
if settings.DEBUG:
def serve_static(request, path):
filename = finders.find(path)
dirname = os.path.dirname(filename)
basename = os.path.basename(filename)
return serve(request, basename, dirname)
urlpatterns += [re_path(r"^static/(?P<path>.*)$", serve_static)]