From the course: Secure Coding in Python

Unlock the full course today

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

The "batteries included" approach in Django

The "batteries included" approach in Django - Python Tutorial

From the course: Secure Coding in Python

Start my 1-month free trial

The "batteries included" approach in Django

- [Instructor] It's time to generate the Django project we'll be working with. And here I am at 03/03_02_begin, then if I hit ls, there's nothing here, so clear my terminal and I'm going to type in pipenv run django-admin startproject feed. Clear my terminal and if I do ls again, there is a new Django project, clear my terminal. Now I'm going to cd into feed. Now, if I look here, there's another subdirectory called feed as well. And in that there is a settings.py file, and that's the one I'm interested in, so I'm going to go ahead and open that. So this is the settings.py file. And if you look at it, there are a couple of things to note right away. If we stroll down a little bit, there is a secret key. On line 23, there's a secret key and right above it, it tells us that this key should be secret, especially the one used in production. So we'll address later on how we make sure this does not get leaked in any way.…

Contents