mirror of
https://github.com/ryancheley/djangocon-us-2025.git
synced 2026-11-05 22:23:09 +00:00
My DjangoCon US 2025 Talk
- HTML 45.6%
- Python 44%
- Just 4.9%
- JavaScript 2.6%
- CSS 2%
- Other 0.9%
- Add justfile quick start commands - Update slide count from 23 to 86 slides - Reorganize slide structure with current organization - Add directory structure documentation - Update customization instructions 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| apps | ||
| core | ||
| patient | ||
| patient_risk | ||
| presentation | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| .pydocstyle | ||
| docker-compose.yml | ||
| Dockerfile | ||
| hello.py | ||
| justfile | ||
| LICENSE | ||
| manage.py | ||
| pgadmin-servers.json.example | ||
| pyproject.toml | ||
| README.md | ||
Core - Django Healthcare Application
A Django 5.2 application built with 12-factor app principles, using PostgreSQL 17 as the database and including pgAdmin for database administration.
Features
- Django 5.2 with Python 3.13
- PostgreSQL 17 database
- pgAdmin 4 for database administration
- Docker containerization
- 12-factor app compliance with django-environ
- Comprehensive testing setup with pytest
- Code quality tools (Black, Ruff, mypy)
- Pre-commit hooks
- Health check endpoint
- Just command runner for streamlined workflow
Prerequisites
- Docker and Docker Compose
- Just command runner (
brew install juston macOS) - Python 3.13+ (for local development)
- uv package manager
Quick Start
-
Clone the repository and navigate to the project:
cd core -
Run the complete setup:
just setup -
Start the development server:
just up -
Access the services:
- Django application: http://localhost:8000
- pgAdmin: http://localhost:5050 (admin@core.local / admin123)
- Health check: http://localhost:8000/health/
Available Commands
Run just --list to see all available commands. Here are the most common ones:
Development
just up- Start all servicesjust down- Stop all servicesjust restart- Restart all servicesjust logs- View logs
Database
just migrate- Run migrationsjust makemigrations- Create new migrationsjust superuser- Create superuserjust dbshell- Open database shelljust pgadmin- Show pgAdmin access info
Testing & Quality
just test- Run testsjust test-cov- Run tests with coveragejust lint- Check code with ruffjust format- Format code with blackjust typecheck- Run type checkingjust quality- Run all quality checks
Utilities
just shell- Django shell with extensionsjust clean- Clean up containersjust reset-db- Reset database (destructive!)
Environment Configuration
Copy .env.example to .env and update the values:
cp .env.example .env
Key environment variables:
SECRET_KEY- Django secret key (generate withjust generate-secret)DEBUG- Debug mode (True/False)DATABASE_URL- PostgreSQL connection stringALLOWED_HOSTS- Comma-separated list of allowed hosts
Development Workflow
- Make changes to the code
- Run quality checks:
just quality - Fix any issues:
just lint-fixandjust format - Run tests:
just test - Commit changes (pre-commit hooks will run automatically)
Testing
The project uses pytest for testing with coverage reporting:
just test # Run all tests
just test-cov # Run with coverage report
just test-file apps/accounts/tests.py # Run specific test file
Code Quality
The project enforces code quality through:
- Black - Code formatting
- Ruff - Fast Python linting
- mypy - Static type checking
- pre-commit - Git hooks for automated checks
Database Management
- PostgreSQL 17 is used as the primary database
- pgAdmin 4 is included for database administration
- Migrations are managed through Django's migration system
- Database backups:
just backup-db - Database restore:
just restore-db backup.sql
Security
- Environment-based configuration
- Secure session and CSRF cookies
- HTTPS enforcement in production
- Security headers configured
- Regular security checks:
just security-check