การดำเนินการตามรายการตรวจสอบการนำไปใช้งาน
ตรวจสอบการตั้งค่าด้วย manage.py check --deploy
การดำเนินการตามรายการตรวจสอบการนำไปใช้งาน เป็นบทเรียน Django Academy ฟรีบน CoddyKit นี่คือบทเรียนที่ 4 จากทั้งหมด 4 บทเรียน คุณสามารถอ่านบทเรียนทั้งหมดด้านล่างฟรี — จากนั้นลองปฏิบัติด้วยตัวคุณเองในเบราว์เซอร์พร้อมตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7 บทเรียนนี้เป็นส่วนหนึ่งของเส้นทางการเรียน Django Academy และความก้าวหน้าของคุณจะซิงค์ข้ามเว็บและแอป CoddyKit คอร์ส Django Academy มีบทเรียนทั้งหมด 4 บทเรียน
บางส่วนของบทเรียนนี้ยังไม่ได้รับการแปล และแสดงเป็นภาษาอังกฤษ
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. 🚀
คำถามที่พบบ่อย
บทเรียน “การดำเนินการตามรายการตรวจสอบการนำไปใช้งาน” ฟรีหรือไม่
ใช่ — ข้อความเต็มของ “การดำเนินการตามรายการตรวจสอบการนำไปใช้งาน” ฟรีให้อ่านที่นี่บนเว็บ เพื่อปฏิบัติแบบโต้ตอบ (ตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7) และปลดล็อคส่วนที่เหลือของคอร์ส Django Academy ให้อัปเกรดเป็น CoddyKit PRO คอร์ส Django Academy มีบทเรียนทั้งหมด 4 บทเรียน
คุณจะเรียนรู้อะไรในบทเรียน “การดำเนินการตามรายการตรวจสอบการนำไปใช้งาน”
ตรวจสอบการตั้งค่าด้วย manage.py check --deploy คุณปฏิบัติ Django Academy ด้วยโค้ดที่ใช้งานได้จริงที่คุณเรียกใช้โดยตรงในเบราว์เซอร์ และติวเตอร์ AI ตลอด 24/7 ตอบคำถามของคุณขณะที่คุณไปผ่านบทเรียน
คุณต้องมีประสบการณ์ก่อนที่จะเริ่มเรียน Django Academy หรือไม่
ไม่จำเป็นต้องมีประสบการณ์มาก่อน Django Academy บน CoddyKit ออกแบบมาสำหรับผู้เริ่มต้นไปจนถึงผู้เรียนขั้นสูง คุณสามารถเริ่มต้นที่นี่หรือเริ่มจากตัวแรกและเรียนด้วยความเร็วของคุณเอง นี่คือบทเรียนที่ 4 จากทั้งหมด 4 บทเรียน
บทเรียน “การดำเนินการตามรายการตรวจสอบการนำไปใช้งาน” ใช้เวลานานแค่ไหน
บทเรียน CoddyKit ส่วนใหญ่ใช้เวลาประมาณ 5–10 นาที แต่ละบทเรียนจึงสั้นและเป็นแบบโต้ตอบ คุณสามารถก้าวหน้าอย่างต่อเนื่องและกลับมาเรียนต่อจากตรงที่เพิ่งหยุดบนเว็บและแอปได้เลย
ฉันเขียนและรันโค้ดในบทเรียน Django Academy นี้ได้ไหม
ได้ บทเรียน Django Academy ทุกบทมีตัวแก้ไขโค้ดในตัว คุณจึงเขียนและรันโค้ดจริงได้เลยในเบราว์เซอร์ และได้รับข้อเสนอแนะจาก AI ในทันที — ไม่ต้องติดตั้งในเครื่องของคุณ
บทเรียนทั้งหมดในหลักสูตรนี้
- DEBUG, SECRET_KEY และ ALLOWED_HOSTS
- HTTPS, HSTS และคุกกี้ที่ปลอดภัย
- การป้องกัน XSS, CSRF และ SQL Injection
- การดำเนินการตามรายการตรวจสอบการนำไปใช้งาน