Tsallaka zuwa abun ciki
Justice Tech School

Secrets and Environment

Keep SECRET_KEY out of the code.

Example
import os
SECRET_KEY = os.environ["DJANGO_SECRET_KEY"]
DEBUG = os.environ.get("DEBUG") == "1"

Exercise

Read env.

os.["KEY"]

Quiz Test

Where should secrets live?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.