A simple todo web application built with Django and PostgreSQL.
# Create and activate virtual environment
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Create the PostgreSQL database
psql postgres -c "CREATE DATABASE todoist;"
# Run migrations
python manage.py migrate
# Start the development server
python manage.py runserverOpen http://localhost:8000 in your browser.
The app is production-ready with:
- Gunicorn as the WSGI server (
Procfile) - WhiteNoise for serving static files
- dj-database-url for database configuration via
DATABASE_URLenv var - django-environ for environment variable management
Set these in your deployment platform:
| Variable | Description |
|---|---|
SECRET_KEY |
Django secret key (generate a new one for production) |
DEBUG |
Set to False in production |
DATABASE_URL |
PostgreSQL connection string |
ALLOWED_HOSTS |
Comma-separated list of allowed hostnames |