Skip to content

Instantly share code, notes, and snippets.

@rpaskin
Created September 10, 2021 14:16
Show Gist options
  • Save rpaskin/f63a9389d94d64bdeca2c69ebf468bf7 to your computer and use it in GitHub Desktop.
Save rpaskin/f63a9389d94d64bdeca2c69ebf468bf7 to your computer and use it in GitHub Desktop.
Settings.py for adding a /static/ path
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.2/howto/static-files/
STATIC_URL = '/static/'
DIR_STATIC = 'static'
STATICFILES_DIRS = [
os.path.join(BASE_DIR, DIR_STATIC),
'/var/www/static/',
]
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment