Skip to content
Learn Netverks

Lesson

Step 32/36 89% through track

deployment-checklist

Deployment checklist

Last reviewed May 28, 2026 Content v20260528
Track mode
server_script
Means
Server runner
Reading
~1 min
Level
advanced

This lesson

This lesson teaches Deployment checklist: the syntax, APIs, and habits you need before advancing in Django.

Teams ship Deployment checklist on every Django codebase—skipping it leaves gaps in debugging and code reviews.

You will apply Deployment checklist in contexts like: SaaS dashboards, CMS-style products, internal tools, and APIs paired with React or mobile clients.

Write Python 3 in the editor and click Run on server—the dev runner executes your script; Django framework lessons also use local startproject for full MVT (LEARNING_RUNNER_ENABLED=true).

When functions, arrays, and basic OOP from intermediate lessons are familiar.

Moving Django from runserver to production requires settings hardening, a WSGI/ASGI server, static/media strategy, and database backups.

Pre-deploy checklist

  • DEBUG = False
  • Set ALLOWED_HOSTS and secure SECRET_KEY from env
  • Configure PostgreSQL (or managed DB) with connection pooling
  • Run migrate and collectstatic
  • Use gunicorn/uvicorn behind nginx or a load balancer
  • HTTPS, HSTS, secure cookies (SESSION_COOKIE_SECURE)
  • Logging, monitoring (Sentry), and automated backups

Never in production

runserver, committed secrets, open ALLOWED_HOSTS = ['*'] without understanding, or serving user uploads without validation.

Important interview questions and answers

  1. Q: WSGI vs ASGI?
    A: WSGI for traditional sync Django; ASGI (Daphne/Uvicorn) for async views and WebSockets.
  2. Q: Where static files served?
    A: nginx, S3+CDN, or WhiteNoise—not Django runserver.
  3. Q: Zero-downtime migrations?
    A: Backward-compatible schema changes, deploy code that works with old and new schema, then finalize.

Self-check

  1. Name three settings that must change for production.
  2. Why not use runserver in production?

Challenge

Local Django check

  1. Create a venv and pip install django.
  2. Run django-admin startproject demo.
  3. Run python manage.py runserver and open the welcome page.

Done when: you see the Django rocket welcome page at localhost:8000.

Interview tip Lesson completion confidence

Can you explain this lesson in 30 seconds without reading notes?

Not saved yet.

Playground

Runs on the configured server runner (dev: npm run runner with LEARNING_RUNNER_ENABLED=true). Output appears below the editor.

Check yourself

Multiple choice — immediate feedback.

Discussion

Past discussion is visible to everyone. Only logged-in users can post comments and replies.

Starter discussion topics

  • ALLOWED_HOSTS why?
  • Gunicorn + Nginx?

Sign up or log in to post comments and sync lesson progress across devices.

No discussion yet. Be the first to ask a question.

Jump