Skip to content

Commit

Permalink
Merge pull request #3002 from dato/django_serve_static_debug
Browse files Browse the repository at this point in the history
Serve static files in debug mode
  • Loading branch information
mouse-reeve authored Sep 22, 2023
2 parents a09b2ab + 1e49568 commit 85b647b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bookwyrm/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
""" url routing for the app and api """
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.urls import path, re_path
from django.views.generic.base import TemplateView

Expand Down Expand Up @@ -774,5 +775,8 @@
path("guided-tour/<tour>", views.toggle_guided_tour),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

# Serves /static when DEBUG is true.
urlpatterns.extend(staticfiles_urlpatterns())

# pylint: disable=invalid-name
handler500 = "bookwyrm.views.server_error"

0 comments on commit 85b647b

Please sign in to comment.