diff --git a/CHANGELOG.txt b/CHANGELOG.txt index ff9acdbc96..a94b11bed8 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -28,6 +28,7 @@ Changelog * Fix: All templates with wagtailsettings and modeladmin now use `block.super` for `extra_js` & `extra_css` (Timothy Bautista) * Fix: Layout issue when using FieldRowPanel with a heading (Andreas Bernacca) * Fix: `file_size` and `file_hash` not updated when Document file changed (Andreas Bernacca) + * Fix: Fixed order of URLs in project template so that static / media URLs are not blocked (Nick Smith) 2.7 LTS (06.11.2019) ~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/releases/2.8.rst b/docs/releases/2.8.rst index ed1b52cfc0..ca7af82784 100644 --- a/docs/releases/2.8.rst +++ b/docs/releases/2.8.rst @@ -42,6 +42,7 @@ Bug fixes * All templates with wagtailsettings and modeladmin now use ``block.super`` for ``extra_js`` & ``extra_css`` (Timothy Bautista) * Layout issue when using FieldRowPanel with a heading (Andreas Bernacca) * ``file_size`` and ``file_hash`` not updated when Document file changed (Andreas Bernacca) + * Fixed order of URLs in project template so that static / media URLs are not blocked (Nick Smith) Upgrade considerations diff --git a/wagtail/project_template/project_name/urls.py b/wagtail/project_template/project_name/urls.py index 4114338d68..89cfde3db5 100644 --- a/wagtail/project_template/project_name/urls.py +++ b/wagtail/project_template/project_name/urls.py @@ -16,14 +16,6 @@ urlpatterns = [ url(r'^search/$', search_views.search, name='search'), - # For anything not caught by a more specific rule above, hand over to - # Wagtail's page serving mechanism. This should be the last pattern in - # the list: - url(r'', include(wagtail_urls)), - - # Alternatively, if you want Wagtail pages to be served from a subpath - # of your site, rather than the site root: - # url(r'^pages/', include(wagtail_urls)), ] @@ -34,3 +26,14 @@ if settings.DEBUG: # Serve static and media files from development server urlpatterns += staticfiles_urlpatterns() urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + +urlpatterns = urlpatterns + [ + # For anything not caught by a more specific rule above, hand over to + # Wagtail's page serving mechanism. This should be the last pattern in + # the list: + url(r"", include(wagtail_urls)), + + # Alternatively, if you want Wagtail pages to be served from a subpath + # of your site, rather than the site root: + # url(r"^pages/", include(wagtail_urls)), +]