Skip to content
Back to Templates

Django Hello World

Use Django on Vercel with Serverless Functions using the Python Runtime.

django + vercel logo

Django + Vercel

This example shows how to use Django on Vercel with Serverless Functions using the Python Runtime.

Demo

https://django-template.vercel.app/

Setting the Secret Key

Django requires a secret key for cryptographic signing to be set in the DJANGO_SECRET environment variable. This can be set in the web interface, or by running:

uv run python -c 'from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())' | vercel env add -y DJANGO_SECRET prod

How it Works

Vercel detects Django's manage.py and uses that to find the WSGI entrypoint and the configuration for static files.

Running Locally

uv sync
uv run python manage.py runserver

Your Django application is now available at http://localhost:8000.

One-Click Deploy

Deploy the example using Vercel:

GitHub Repovercel/examples
Use Cases
Stack