--- id: django-maintenance-mode version: "0.23.0" license: unclear license_treatment: permissive maintenance: active --- # django-maintenance-mode — shows a 503 error page when maintenance-mode is on. License: permissive · Maintenance: active · Downloads: 278.1K/mo ## What it is and what it does django-maintenance-mode is a Django middleware that intercepts requests and returns a 503 Service Unavailable response when maintenance mode is enabled. It operates at the application level without touching the database or requiring the server to restart, making it suitable for planned downtime, deployments, or migrations. The middleware can be configured to exclude specific users (staff, superusers, authenticated), IP addresses, or URL patterns, and supports multiple state backends (local file, cache, storage) to track whether maintenance mode is active. The package is designed for developers who need to take their Django site offline temporarily while keeping the application running. It handles response customization (HTML or JSON), redirect URLs, retry headers, and context processors for template rendering. Configuration is entirely optional—sensible defaults apply if not specified—and the middleware can be positioned in the stack to control which other middleware executes during maintenance. Use it for: - Display a maintenance page during database migrations or schema updates without restarting the application. - Temporarily take a site offline for emergency fixes or deployments while keeping the server process running. - Allow staff and superusers to continue accessing the admin site or specific URLs while other users see the maintenance page. - Return JSON responses for API endpoints during maintenance while serving HTML to web browsers. - Redirect users to an external status page or alternative URL during planned downtime. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Activates a 503 maintenance page in Django applications without requiring database access or stopping the application server. Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and solves a common operational need in Django deployments. The permissive MIT license and broad Django version support (4.2 through 6.0) make it a safe choice for most projects. Install it if you need to take your site offline without restarting the server. ## Install pip install django-maintenance-mode uv add django-maintenance-mode poetry add django-maintenance-mode ## Installing django-maintenance-mode Before you install: Low install friction with a single wheel distribution. Actively maintained with a recent release (31 days old) and consistent commit activity. Depends only on django and python-fsutil. License in practice: MIT license (permissive) allows commercial and private use with minimal restrictions. Quickstart: pip install django-maintenance-mode # In settings.py: INSTALLED_APPS = [ 'maintenance_mode', # ... ] MIDDLEWARE = [ # ... 'maintenance_mode.middleware.MaintenanceModeMiddleware', ] # Create templates/503.html, then toggle: MAINTENANCE_MODE = True Requires a custom 503.html template in your templates directory; middleware position matters for which middleware executes during maintenance mode. Verify before relying: - Whether python-fsutil has any known issues or maintenance concerns not reflected in this package's security record. - Whether the local file backend state file is safe for concurrent writes in multi-process deployments. ## Package facts - License: not declared (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 278.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags django maintenance mode, 503 error page django, django offline mode, django service unavailable, django downtime page, django maintenance middleware, toggle maintenance page django, django-middleware, deployment-ops [View on SkillFed](https://skillfed.io/packages/django-maintenance-mode) · [View on PyPI](https://pypi.org/project/django-maintenance-mode/)