chore: configure media upload settings

parent aa5cfd9a
......@@ -131,3 +131,10 @@ STATIC_URL = '/static/'
# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'static'),
)
\ No newline at end of file
......@@ -15,6 +15,8 @@ Including another URLconf
"""
from django.contrib import admin
from django.urls import include, path
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
path('assignments/', include('assignments.urls', namespace="assignments")),
......@@ -22,4 +24,5 @@ urlpatterns = [
path("homepage/", include('homepage.urls', namespace="homepage")),
path('admin/', admin.site.urls),
path('announcements/', include('announcements.urls', namespace="announcements")),
]
]+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment