Skip to content
Snippets Groups Projects
Verified Commit 28a81eb0 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Serve media from runuwsgi

parent dd8917e9
No related branches found
No related tags found
1 merge request!528[uWSGI] Make serving of /static configurable
......@@ -67,6 +67,7 @@ UWSGI = {
"module": "aleksis.core.wsgi",
}
UWSGI_SERVE_STATIC = True
UWSGI_SERVE_MEDIA = True
ALLOWED_HOSTS = _settings.get("http.allowed_hosts", [])
......
from django.apps import apps
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.auth import views as auth_views
from django.urls import include, path
......@@ -199,9 +198,6 @@ urlpatterns = [
),
]
# Serve media files from MEDIA_ROOT to make it work with runserver
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
# Add URLs for optional features
if hasattr(settings, "TWILIO_ACCOUNT_SID"):
from two_factor.gateways.twilio.urls import urlpatterns as tf_twilio_urls # noqa
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment