
This example shows how to use Django on Vercel with Serverless Functions using the Python Runtime.
https://django-template.vercel.app/
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 prodVercel detects Django's manage.py and uses that to find the WSGI entrypoint and the configuration for static files.
uv syncuv run python manage.py runserverYour Django application is now available at http://localhost:8000.
Deploy the example using Vercel: