Skip to content

Instantly share code, notes, and snippets.

@jayhale
Created May 7, 2019 11:51
Show Gist options
  • Select an option

  • Save jayhale/cb40954762c32b13e1f6cf7733d4a6bc to your computer and use it in GitHub Desktop.

Select an option

Save jayhale/cb40954762c32b13e1f6cf7733d4a6bc to your computer and use it in GitHub Desktop.
Django staticfiles on Zeit Now: settings.py
# now_app/settings.py
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.abspath(__file__)))
# ...
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles_build', 'static')
# ...
@oyedejioyewole

Copy link
Copy Markdown

Do I have to use WhiteNoise

@jayhale

jayhale commented Sep 28, 2020

Copy link
Copy Markdown
Author

No, WhiteNoise is not needed. Static files are served by Zeit directly, no need to host them in the lambda.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment