Define Media root and URL for uploaded/generated files
This commit is contained in:
parent
9c1771b414
commit
97502fe130
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@ __pycache__/
|
||||
*.sqlite3
|
||||
/__pypackages__/
|
||||
/markdownx/
|
||||
/media/
|
||||
|
@ -118,6 +118,9 @@ LOGGING = {
|
||||
},
|
||||
}
|
||||
|
||||
MEDIA_ROOT = "media"
|
||||
MEDIA_URL = "media/"
|
||||
|
||||
WIKI_URL = "https://wiki.claremontmakerspace.org"
|
||||
|
||||
# Django Rest Framework
|
||||
|
@ -15,6 +15,7 @@ Including another URLconf
|
||||
"""
|
||||
|
||||
from django.conf import settings
|
||||
from django.conf.urls.static import static
|
||||
from django.contrib import admin
|
||||
from django.contrib.auth.views import LoginView, LogoutView
|
||||
from django.urls import include, path
|
||||
@ -63,3 +64,4 @@ urlpatterns = [
|
||||
|
||||
if settings.DEBUG:
|
||||
urlpatterns.append(path("__debug__/", include("debug_toolbar.urls")))
|
||||
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
|
Loading…
Reference in New Issue
Block a user