This commit is contained in:
parent
48adb556a5
commit
a11976b570
@ -15,9 +15,10 @@ Including another URLconf
|
||||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
||||
"""
|
||||
from django.contrib import admin
|
||||
from django.urls import path, include
|
||||
from django.urls import path, include, re_path
|
||||
from django.conf import settings
|
||||
from django.conf.urls.static import static
|
||||
from django.views.static import serve as static_serve
|
||||
|
||||
admin.site.site_header = "Polisplexity City Technologies"
|
||||
admin.site.site_title = "Polisplexity Admin Portal"
|
||||
@ -67,4 +68,6 @@ if settings.DEBUG:
|
||||
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
||||
|
||||
if settings.DEBUG or settings.SERVE_MEDIA:
|
||||
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
urlpatterns += [
|
||||
re_path(r"^media/(?P<path>.*)$", static_serve, {"document_root": settings.MEDIA_ROOT}),
|
||||
]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user