Skip to content

Commit

Permalink
add media and styling static dirs, static settings and urls
Browse files Browse the repository at this point in the history
  • Loading branch information
brianach committed Dec 13, 2023
1 parent e454f58 commit 9b4eed6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions fmci_store/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,3 +152,9 @@
# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field

DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'

STATIC_URL = '/static/'
STATICFILES_DIRS = (os.path.join(BASE_DIR, 'static'),)

MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
4 changes: 3 additions & 1 deletion fmci_store/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@
"""
from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static

urlpatterns = [
path('admin/', admin.site.urls),
path('accounts/', include('allauth.urls')),
path('', include('home.urls')),
]
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

0 comments on commit 9b4eed6

Please sign in to comment.