From the course: Secure Coding in Python (2020)
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
The "batteries included" approach in Django - Python Tutorial
From the course: Secure Coding in Python (2020)
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.…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.