Skip to content
Back to Templates

Django Notes App

A simple note-taking app built with Django, using SQLite locally and Postgres on Vercel.

Django + Postgres + Vercel logo

Django Notes

A simple note-taking app built with Django, demonstrating server-side rendering, URL routing, forms, and ORM with SQLite locally and Postgres on Vercel.

Demo

https://django-notes-example.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

This example uses Django's ORM, templates, and staticfiles app, served via WSGI on Vercel. The database defaults to SQLite locally and switches to Postgres when DATABASE_URL is set — Vercel automatically provisions this environment variable when you add a Postgres database. You can add a database during project import or later from the Storage tab.

Migrations run automatically on each deploy via [tool.vercel.scripts] in pyproject.toml. Because of this, you should use a database provider that supports branching (like Neon) so that preview deployments run migrations against an isolated branch rather than your production database.

Setting READ_ONLY=true disables all write operations.

Running Locally

uv sync
uv run python manage.py migrate
uv run python manage.py runserver

Your app is now available at http://localhost:8000.

One-Click Deploy

Deploy the example using Vercel:

GitHub Repovercel/examples
Use Cases
Stack