Subjects

All subjects Django Java Python React Spring Boot JavaScript PHP
Sign Up Free
Django 10 questions

Django Deployment & DevOps

More Django
Interview questions 1–10 of 10
1

Why can't you use Django's runserver in production, and what should you use instead?

Django's development server (manage.py runserver) is explicitly single-threaded by default, unoptimized for pe...

Read answer →
2

What is the difference between WSGI and ASGI, and when do you need ASGI for a Django project?

WSGI (Web Server Gateway Interface) is the traditional synchronous interface between a Python web application...

Read answer →
3

How does collectstatic work and how should static files be served in production?

During development, Django's runserver automatically serves static files (CSS, JS, images) from each app's sta...

Read answer →
4

How do you manage environment-specific settings and secrets in Django (django-environ, .env files)?

Hardcoding secrets (database passwords, API keys, SECRET_KEY) directly in settings.py is a serious security ri...

Read answer →
5

How do you dockerize a Django application, and what does a typical Dockerfile look like?

Dockerizing Django packages the application, its exact Python dependencies, and system libraries into a single...

Read answer →
6

What are Django database migrations and how do you safely run them in a zero-downtime deployment?

Migrations are Django's version-controlled way of evolving the database schema to match model changes over tim...

Read answer →
7

What Django settings must be changed for production (DEBUG, ALLOWED_HOSTS, SECRET_KEY, security headers)?

DEBUG must be set to False in production; leaving it True exposes detailed stack traces, local variable values...

Read answer →
8

How do you set up a CI/CD pipeline for a Django project (testing, linting, and automated deployment)?

A CI/CD pipeline (using GitHub Actions, GitLab CI, or Jenkins) automatically runs on every push or pull reques...

Read answer →
9

How do you handle Django logging and error tracking in production (Sentry, structured logging)?

With DEBUG=False in production, Django no longer shows detailed error pages to users, which is correct for sec...

Read answer →
10

How do you scale a Django application horizontally, and what state must move out of the app servers?

Horizontal scaling means running multiple identical Django application instances behind a load balancer instea...

Read answer →