Fix serving media-URLs for development (#4355)

This commit is contained in:
Richard Schreiber
2024-07-30 09:17:27 +02:00
committed by GitHub
parent 858a448db5
commit 83a8fcaa47

View File

@@ -33,6 +33,7 @@
# License for the specific language governing permissions and limitations under the License.
from django.conf import settings
from django.conf.urls.static import static
from django.urls import include, re_path
from django.views.generic import RedirectView
@@ -68,6 +69,7 @@ control_patterns = [
debug_patterns = []
if settings.DEBUG:
base_patterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
try:
import debug_toolbar