Skip to content

Commit

Permalink
fix bug of django.views.static.serve, use django.contrib.staticfiles.…
Browse files Browse the repository at this point in the history
…views.serve
  • Loading branch information
wklken committed Mar 25, 2021
1 parent 8a081bc commit 57fde0a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions paas2/paas/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,12 @@
# for upload/download
# urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from account.decorators import login_exempt # noqa
import django.views # noqa

static_serve = login_exempt(django.views.static.serve)
# import django.views # noqa
import django.contrib # noqa

# static_serve = login_exempt(django.views.static.serve)
static_serve = login_exempt(django.contrib.staticfiles.views.serve)
urlpatterns.append(url(r"^media/(?P<path>.*)$", static_serve, {"document_root": settings.MEDIA_ROOT}))

# download for default resources
Expand Down

0 comments on commit 57fde0a

Please sign in to comment.