How To Store Django Secret Keys In Development And Production

preview_player
Показать описание
Learn how to properly secure Django Secret Keys (or SECRET_KEYs) both in development and production modes.

References:
---
My Links:

Timestamps:
1. Intro 00:00
2. Why I'm making this video 00:10
3. How to Store Secret Keys (basic setup) 03:20
4. How I Store Secret Keys (advanced setup) 09:30
5. Outro 13:40
Рекомендации по теме
Комментарии
Автор

Thank you for the tutorial. For production do I have to hardcode DJANGO_SETTINGS_MODULE whenever I push and pull in server?

breadbreadbreader
Автор

I made the same steps you did but im getting this message when try to open the local server (CommandError: You must set settings.ALLOWED_HOSTS if DEBUG is False.). i checked the DEBUG and its true.

mortazaamer
Автор

The most clearest one for secret key settings! thanks Zack!

danhao
Автор

Thanks a lot ! I ended up accidentally committing my aws secret keys to github lol, should have seen this tutorial before! great tutorial

yashnanathwani
Автор

Nice one. Thanks a lot. But please, you mentioned that 'DJANGO_SETTINGS_MODULE' has to be set in Heroku or any other platform. Please how can that be done?

infohub
Автор

Thanks for the video, man! What do you mean by production phase ? When we should change de DEBUG to False ?

eduardocardoso
Автор

Great tutorial. It helped me a lot. Thanks.
I have a struggle though with cloudinary. How do I set up the cloudinary.config() for development? Right now I am uploading to the same place both on production and development because of the CloudinaryField() in models.py which requires cloudinary.config()

Rei-kmyj
Автор

Thanks a lot man!! thanks for also coming through with a video after your SO answer
There's truth that on the internet you can learn anything for coding and becoming a developer, but all courses and bootcamps kinda miss the step past developing a dummy and getting "production ready"
I know that a junior dev won't be handling production stuff and would be at the beginning of the pipeline, but at least having a course understanding of practices in general is definetly something i feel one has to have to make a good impression.
thanks a looot

dluca
Автор

Thank you very much! I just have one question, what if I need to keep the secret keys in development mode and in .env at the same time, and I want to share the .env with the development team? is there a way of sharing the .env without going through the hassle of sending it to each member?

alanricheh
Автор

With python-decouple my my CSS goes missing when I deploy.
With django-dotenv my CSS goes missing immediately.
What is going on?

northpeace
Автор

i used .env file to store variable values..
Is it ok ?

ytg