Skip to content

Commit

Permalink
Merge pull request #242 from ita-social-projects/feature/public-folders
Browse files Browse the repository at this point in the history
Public folders
  • Loading branch information
ProDG authored Sep 29, 2023
2 parents fd9c222 + a0c6d6d commit 7e1397b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@
/.DS_Store
__pycache__/
/FrontEnd/node_modules

public/*
!public/media/.gitkeep
!public/static/.gitkeep
8 changes: 7 additions & 1 deletion forum/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
For the full list of settings and their values, see
https://docs.djangoproject.com/en/4.1/ref/settings/
"""
import os
from datetime import timedelta
from pathlib import Path

Expand Down Expand Up @@ -147,7 +148,12 @@
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/4.1/howto/static-files/

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

MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'public', 'media')


# Default primary key field type
# https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field
Expand Down
Empty file added public/media/.gitkeep
Empty file.
Empty file added public/static/.gitkeep
Empty file.

0 comments on commit 7e1397b

Please sign in to comment.