From the course: Secure Coding in Python

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Generating new projects

Generating new projects - Python Tutorial

From the course: Secure Coding in Python

Start my 1-month free trial

Generating new projects

- [Instructor] Application secrets are pieces of sensitive information that have to be handled with special care. Such information include secret keys, database passwords and tokens. Secrets should be kept out of source code and source control. And must be replaced if there's even a suspicion that they have been compromised. Let's look at a basic way to keep a secret out of our application. So I'm going to head over to my exercise file to 03, 03_03_begin, feed, feed, settings.py And over at line 23 you'll see the secret key. Which as the name implies is a secret. So the first thing I'll do is cut it. I'll head over to my terminal. And here I am again at 03, 03_03_begin. And I'm going to create a file with one command. So echo. And I'm going to paste this secret key. And then type in greater than. Secret_key.txt. By the way this is straight out of the Django documentation and that I highly encourage you check…

Contents