PreviewDrop for Django

Django preview environments. $19/mo flat.

Every Django branch gets a live HTTPS URL — migrations run, Celery workers start, Channels websockets work, admin site loads. The same Docker container you'd push to prod, on infrastructure you never touch. No serverless adapters, no Lambda limits.

TL;DR
Drop the Dockerfile below into your Django repo, set ALLOWED_HOSTS, DATABASE_URL, and DJANGO_SECRET_KEY in the Variables tab, push a branch. 5 minutes to your first preview URL. Works with Django 4.x and 5.x, Python 3.10+. $19/mo on Starter. No per-build charges.

How PreviewDrop compares for Django

FeaturePreviewDropVercelRailway / Render
Django supportFirst-class — Dockerfile or auto-detectNot natively — django-vercel adapterFirst-class — Dockerfile based
Migrations at startRun in container CMDNo persistent processRun in container CMD
Celery workersSecond project on same repoNot supportedSeparate service
Channels / WebSocketNative, no limitLimited by serverlessNative, no limit
Admin siteWorks out of the boxWorks (if adapter configured)Works out of the box
ALLOWED_HOSTS handlingOne glob in Variables tabn/aManual per-service config
Pricing$19/mo flatPer-seat + usage-basedUsage-based or per-seat
CI config neededNoneNoneMinimal to none
Password protectionOne toggleIf you build authIf you build auth
PR comment with URLBuilt-inBuilt-inBuilt-in or scripted
Auto-expiring TTL1–168 hours by planManual cleanupManual or configurable

When to pick each

PreviewDrop — You want Django previews on every PR with zero CI config and a flat $19/mo price. You don't want to maintain infrastructure, YAML workflows, or serverless adapters.

Vercel — Django is not Vercel's target. Use it only if your Django app is a thin API layer and you're comfortable with serverless constraints (10s execution limit, no Celery, no Channels).

Railway / Render — Good general-purpose platforms if you also need production hosting from the same vendor. You trade higher and less predictable cost for unified tooling.

What Django teams actually deal with

ALLOWED_HOSTS breaks every new preview
The single most common Django preview failure. One misconfigured ALLOWED_HOSTS and Django returns DisallowedHost on every request. PreviewDrop's wildcard subdomain pattern (.previews.previewdrop.dev) covers all previews with a single glob — set it once.
Migrations that need a real database
Django previews without migrations are half-baked — the admin site is broken, models are stale. Running migrate at container start means every preview gets a current schema. Pair with Neon branching for per-branch database isolation.
Serverless shoehorning wastes engineering time
Fitting Django into a serverless function (django-vercel, Zappa, etc.) means giving up Celery, Channels, middleware, and long-running management commands. You're deploying a reduced version of your app — one that diverges from production in subtle, hard-to-debug ways.
Manual staging deploys slow down review
Without per-branch previews, the only way to see a Django change live is to merge it to staging — or run docker compose locally and expose it with ngrok. Neither is fast. A preview URL posted to the PR the moment you push changes the review cadence entirely.

Dockerfile

Drop this at the root of your Django repo. It installs system dependencies, runs pip install, and starts gunicorn with migrations. PreviewDrop picks it up automatically on the next push.

Dockerfile
FROM python:3.12-slim WORKDIR /app RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential libpq-dev \ && rm -rf /var/lib/apt/lists/* COPY requirements.txt ./ RUN pip install --no-cache-dir -r requirements.txt COPY . . EXPOSE 8000 CMD ["sh", "-c", "python manage.py migrate --noinput && \ gunicorn project.wsgi --bind 0.0.0.0:$PORT --workers 2"]

How it works

1
Add the Dockerfile
Drop the Dockerfile above at the root of your Django repo. If you already have one, skip this. PreviewDrop also auto-detects Django repos without a Dockerfile.
2
Set your env vars
DATABASE_URL, DJANGO_SECRET_KEY, ALLOWED_HOSTS, CSRF_TRUSTED_ORIGINS. Set once in the Variables tab — encrypted at rest, injected at container start.
3
Push and preview
Every branch gets a live HTTPS URL posted to the PR. Migrations run, admin site loads, Celery workers start. Preview auto-expires on merge or per your plan TTL.

$19/mo flat. Unlimited Django previews.

No per-build charges, no usage-based billing, no serverless function invocation math. Preview every Django branch without thinking about cost.

Start free with GitHub

See your Django branch live before it merges

Connect a repo, push a branch, get a URL. No credit card, no serverless adapters, no CI config.

Start free
Framework guidesRailsLaravelExpo