Eseguire la checklist di deployment
Verificare le impostazioni con manage.py check --deploy
Eseguire la checklist di deployment è una lezione Django Academy gratuita su CoddyKit. Questa è la lezione 4 di 4. Puoi leggere la lezione completa qui gratuitamente — poi esercitati direttamente nel browser con un editor di codice integrato e un tutor IA disponibile 24/7. Fa parte del percorso di apprendimento Django Academy, e i tuoi progressi si sincronizzano tra il web e l'app CoddyKit. Il corso Django Academy include 4 lezioni in totale.
Parti di questa lezione non sono ancora state tradotte e vengono mostrate in inglese.
One Command to Audit Everything
Django ships a built-in security auditor. The deployment checklist scans your settings and warns you about anything unsafe before launch day. ✅
Run check --deploy
Run the check command with the deploy flag. It activates extra security checks that normal checks skip, printing warnings you can act on.
python manage.py check --deployReading the Warnings
Each warning has a code like security.W008 and a clear message. Use the code to look up exactly which setting to fix in the docs.
Check the Right Settings
Point the checker at your production config, not your dev one. Set DJANGO_SETTINGS_MODULE so it audits the file that will actually run live.
DJANGO_SETTINGS_MODULE=config.settings.prod python manage.py check --deployIt Flags DEBUG
If DEBUG is still True, the check shouts about it. A live site with DEBUG on leaks tracebacks and settings, so this is a hard stop.
It Flags Insecure Cookies
The checklist warns when SESSION_COOKIE_SECURE or CSRF_COOKIE_SECURE is off, reminding you to keep auth cookies on HTTPS only.
It Flags Missing HSTS
A zero SECURE_HSTS_SECONDS or missing SSL redirect triggers warnings too. The check nudges you toward forcing encrypted connections everywhere.
Silencing False Positives
A few warnings may not fit your setup. You can quiet specific ones with SILENCED_SYSTEM_CHECKS, but only after you truly understand each.
SILENCED_SYSTEM_CHECKS = ["security.W004"]Make It Fail the Build
Treat warnings as errors in CI by adding --fail-level. Now a risky setting breaks the pipeline instead of slipping into production.
python manage.py check --deploy --fail-level WARNINGMake It a Habit
Run the checklist on every release, not just the first. New apps and settings can quietly reintroduce risks the audit will catch for you.
Pair It With Other Checks
The deploy check is one layer. Run your tests and collectstatic in the same release step so code, assets, and security all get verified together.
Quick Check
Last question of the lesson, then a recap.
Recap: Ship With Confidence
You learned to run check --deploy, read its warning codes, point it at prod settings, and even fail CI on risk. Audit every release and ship with confidence. 🚀
Domande Frequenti
La lezione «Eseguire la checklist di deployment» è gratuita?
Sì — il testo completo di «Eseguire la checklist di deployment» è gratuito qui sul web. Per esercitarvi in modo interattivo (un editor di codice integrato e un tutor IA 24/7) e sbloccare il resto del corso Django Academy, passa a CoddyKit PRO. Il corso Django Academy include 4 lezioni in totale.
Cosa imparerò in «Eseguire la checklist di deployment»?
Verificare le impostazioni con manage.py check --deploy Eserciti Django Academy con codice pratico che esegui direttamente nel browser, e un tutor IA 24/7 risponde alle tue domande mentre lavori sulla lezione.
Ho bisogno di esperienza per iniziare Django Academy?
Non è richiesta alcuna esperienza precedente. Django Academy su CoddyKit è strutturato per principianti e studenti avanzati, quindi puoi iniziare da qui o dall'inizio e procedere al tuo ritmo. Questa è la lezione 4 di 4.
Quanto tempo richiede la lezione «Eseguire la checklist di deployment»?
La maggior parte delle lezioni CoddyKit richiede circa 5–10 minuti. Ogni lezione è breve e interattiva, quindi fai progressi costanti e riprendi esattamente da dove hai lasciato su web e app.
Posso scrivere ed eseguire codice in questa lezione Django Academy?
Sì. Ogni lezione Django Academy include un editor di codice integrato, quindi scrivi ed esegui codice reale direttamente nel tuo browser e ricevi feedback istantaneo dall'IA — nessuna configurazione locale necessaria.
Tutte le lezioni di questo corso
- DEBUG, SECRET_KEY e ALLOWED_HOSTS
- HTTPS, HSTS e cookie sicuri
- Difese contro XSS, CSRF e SQL injection
- Eseguire la checklist di deployment