diff --git a/.gitignore b/.gitignore index e4a0832..d07ba1a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ __pycache__/ *.sqlite3 /__pypackages__/ /markdownx/ +/media/ diff --git a/cmsmanage/settings/base.py b/cmsmanage/settings/base.py index 820faf9..b667e02 100644 --- a/cmsmanage/settings/base.py +++ b/cmsmanage/settings/base.py @@ -118,6 +118,9 @@ LOGGING = { }, } +MEDIA_ROOT = "media" +MEDIA_URL = "media/" + WIKI_URL = "https://wiki.claremontmakerspace.org" # Django Rest Framework diff --git a/cmsmanage/urls.py b/cmsmanage/urls.py index 0cd2fce..cc002cc 100644 --- a/cmsmanage/urls.py +++ b/cmsmanage/urls.py @@ -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)