feat: Setup media
This commit is contained in:
parent
1dc8305027
commit
abdcb2c8ad
2 changed files with 9 additions and 4 deletions
|
@ -165,6 +165,7 @@ USE_TZ = True
|
||||||
# -> https://docs.djangoproject.com/en/4.2/howto/static-files/
|
# -> https://docs.djangoproject.com/en/4.2/howto/static-files/
|
||||||
|
|
||||||
STATIC_URL = "static/"
|
STATIC_URL = "static/"
|
||||||
|
MEDIA_URL = "media/"
|
||||||
|
|
||||||
STATICFILES_DIRS = [BASE_DIR / "shared" / "static"]
|
STATICFILES_DIRS = [BASE_DIR / "shared" / "static"]
|
||||||
STATICFILES_FINDERS = [
|
STATICFILES_FINDERS = [
|
||||||
|
|
|
@ -28,7 +28,11 @@ urlpatterns = [
|
||||||
]
|
]
|
||||||
|
|
||||||
if settings.DEBUG:
|
if settings.DEBUG:
|
||||||
urlpatterns += [
|
urlpatterns += (
|
||||||
|
[
|
||||||
path("__reload__/", include("django_browser_reload.urls")),
|
path("__reload__/", include("django_browser_reload.urls")),
|
||||||
path("__debug__/", include("debug_toolbar.urls")),
|
path("__debug__/", include("debug_toolbar.urls")),
|
||||||
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
]
|
||||||
|
+ static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
||||||
|
+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||||
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue