Skip to content

Commit

Permalink
Add static paths
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvshettty committed Dec 2, 2022
1 parent 3b96f7b commit 70dc66f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
Binary file modified db.sqlite
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 8 additions & 3 deletions settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,17 @@
MEDIA_URL = '/media/'

# PROJECT_DIR = os.path.abspath(os.path.dirname(__file__))
# BASE_DIR = os.path.dirname(os.path.dirname(__file__))
BASE_DIR = Path(__file__).resolve().parent.parent
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
# BASE_DIR = Path(__file__).resolve().parent.parent

STATIC_URL = 'static/'
STATIC_ROOT = BASE_DIR / "staticfiles"
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
TEMPLATE_DIRS = (
os.path.join(BASE_DIR, 'templates'),
os.path.join(BASE_DIR, 'oscar'),
# Add to this list all the locations containing your static files
)
# STATICFILES_DIRS = (
# location('static/'),
# )
Expand Down
3 changes: 2 additions & 1 deletion wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")

from django.core.wsgi import get_wsgi_application # isort:skip

from whitenoise.django import DjangoWhiteNoise

application = get_wsgi_application()
application = DjangoWhiteNoise(application)

0 comments on commit 70dc66f

Please sign in to comment.