We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
As a developer, I can add my config vars to my app in Heroku so that I can allow deployment to production
#1 Create Heroku App
#4 Cloudinary Setup
Login to your Heroku account and select the App
Go to the settings tab and scroll down to Config Vars
USER STORY: Cloudinary Setup #4 Setup Cloudinary
Add correct config vars
CLOUDINARY_URL
DATABASE_URL
SECRET_KEY
PORT
8000
DISABLE_COLLECTSTATIC
1
Copy Cloudinary API Environment variable in your Cloudinary dashboard
Add variable to your env.py file
env.py
Add 'cloudinary_storage' & 'cloudinary' to INSTALLED_APPS
'cloudinary_storage'
'cloudinary'
INSTALLED_APPS
Tell Django to use Cloudinary to store our static files
Add to settings.py - STATICFILES_STORAGE = 'cloudinary_storage.storage.StaticHashedCloudinaryStorage' STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')] STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles') MEDIA_URL = '/media/' DEFAULT_FILE_STORAGE = 'cloudinary_storage.storage.MediaCloudinaryStorage'
settings.py
STATICFILES_STORAGE = 'cloudinary_storage.storage.StaticHashedCloudinaryStorage'
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')]
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
MEDIA_URL = '/media/'
DEFAULT_FILE_STORAGE = 'cloudinary_storage.storage.MediaCloudinaryStorage'
Add to the build paths -
TEMPLATES_DIR = os.path.join(BASE_DIR, 'templates')
Add 'DIRS': [TEMPLATES_DIR], to TEMPLATES
[TEMPLATES_DIR],
TEMPLATES
Add Heroku host name to ALLOWED_HOSTS
ALLOWED_HOSTS
ALLOWED_HOSTS = ['kitchen-tales.herokuapp.com', 'localhost']
Create 3 new folders in the top level of the project
The text was updated successfully, but these errors were encountered:
64a6fe1
chris-townsend
No branches or pull requests
User Story:
As a developer, I can add my config vars to my app in Heroku so that I can allow deployment to production
Acceptance Criteria:
Related User Stories:
#1 Create Heroku App
#4 Cloudinary Setup
Tasks:
Login to your Heroku account and select the App
Go to the settings tab and scroll down to Config Vars
USER STORY: Cloudinary Setup #4 Setup Cloudinary
Add correct config vars
CLOUDINARY_URL
DATABASE_URL
SECRET_KEY
PORT
-8000
DISABLE_COLLECTSTATIC
-1
(only used for development)Copy Cloudinary API Environment variable in your Cloudinary dashboard
Add variable to your
env.py
fileAdd
'cloudinary_storage'
&'cloudinary'
toINSTALLED_APPS
Tell Django to use Cloudinary to store our static files
Add to
settings.py
-STATICFILES_STORAGE = 'cloudinary_storage.storage.StaticHashedCloudinaryStorage'
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')]
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
MEDIA_URL = '/media/'
DEFAULT_FILE_STORAGE = 'cloudinary_storage.storage.MediaCloudinaryStorage'
Add to the build paths -
TEMPLATES_DIR = os.path.join(BASE_DIR, 'templates')
Add 'DIRS':
[TEMPLATES_DIR],
toTEMPLATES
Add Heroku host name to
ALLOWED_HOSTS
ALLOWED_HOSTS = ['kitchen-tales.herokuapp.com', 'localhost']
(localhost is added so we can run it locally)Create 3 new folders in the top level of the project
The text was updated successfully, but these errors were encountered: