1
0
mirror of https://github.com/etesync/server synced 2024-12-26 17:28:08 +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
parent e635e081c7
commit 13a137a128

View File

@ -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)]