Replacing url with re_path

This commit is contained in:
Leonhard Strohmidel 2022-09-17 18:16:35 +02:00
parent c483c3511d
commit 72094494eb

View File

@ -21,8 +21,7 @@ from django.contrib import admin
from django.conf import settings from django.conf import settings
from django.views.static import serve from django.views.static import serve
from django.conf.urls.static import static from django.conf.urls.static import static
from django.conf.urls import url from django.urls import path, include, re_path
from django.urls import path, include
from django.views.generic.base import TemplateView from django.views.generic.base import TemplateView
from lostplaces.views import SignUpView from lostplaces.views import SignUpView
@ -32,6 +31,6 @@ urlpatterns = [
path('signup/', SignUpView.as_view(), name='signup'), path('signup/', SignUpView.as_view(), name='signup'),
path('explorer/', include('django.contrib.auth.urls')), path('explorer/', include('django.contrib.auth.urls')),
path('', include('lostplaces.urls')), path('', include('lostplaces.urls')),
url(r'^static/(?P<path>.*)$', serve,{'document_root': settings.STATIC_ROOT}), re_path(r'^static/(?P<path>.*)$', serve,{'document_root': settings.STATIC_ROOT}),
url(r'^uploads/(?P<path>.*)$', serve,{'document_root': settings.MEDIA_ROOT}) re_path(r'^uploads/(?P<path>.*)$', serve,{'document_root': settings.MEDIA_ROOT})
] ]