mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-21 05:18:26 +02:00
Fix static files!
This commit is contained in:
@ -13,7 +13,9 @@ Including another URLconf
|
||||
1. Import the include() function: from django.urls import include, path
|
||||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
||||
"""
|
||||
import re
|
||||
|
||||
from django.conf import settings
|
||||
from django.contrib import admin
|
||||
from django.contrib.staticfiles.views import serve
|
||||
from django.urls import path, include, re_path
|
||||
@ -36,7 +38,7 @@ urlpatterns = [
|
||||
|
||||
path('api/', include('api.urls')),
|
||||
|
||||
re_path(r'^static/(?P<path>.*)$', serve),
|
||||
re_path(r'^{prefix}(?P<path>.*)$'.format(prefix=re.escape(settings.STATIC_URL.lstrip('/'))), serve),
|
||||
|
||||
# Supporting old paths
|
||||
path('inscription/', RedirectView.as_view(pattern_name="member:signup")),
|
||||
|
Reference in New Issue
Block a user