Personal Catalogue: Django & PostgreSQL — Chapter 9, Exercise 1 ==================================================== TASK Create .env.example with placeholder values, add .env to a real .gitignore, and confirm (with git status, assuming the project is a Git repository) that .env genuinely doesn't appear as a trackable file once .gitignore is in place. SOLUTION 1. Create .env.example in the project root, committed, with placeholder values only: DJANGO_SECRET_KEY=REPLACE_ME DJANGO_DEBUG=False DJANGO_ALLOWED_HOSTS=catalogue.example.com DB_NAME=catalogue DB_USER=REPLACE_ME DB_PASSWORD=REPLACE_ME DB_HOST=localhost DB_PORT=5432 2. Create a real, working .env (copy .env.example, then replace every REPLACE_ME with actual real local values, and adjust DJANGO_DEBUG to True for local development). 3. Add to .gitignore (create the file if it doesn't already exist): .env 4. Run: git status CONFIRMING THE RESULT Before .gitignore included .env, a fresh .env file would show up under "Untracked files" in git status output. After adding .env to .gitignore, running git status again should no longer list .env at all - Git treats it as intentionally ignored, and it won't appear even under "Untracked files." .env.example, by contrast, should show up normally as untracked (before the first commit) or tracked (after), since it was never added to .gitignore. WHY THIS WORKS AS AN ANSWER ---------------------------- It creates both files with the correct real/placeholder distinction, adds the ignore rule, and verifies the actual outcome with git status rather than just trusting the .gitignore entry was written correctly.