Installation Guide
Get Django Revolution running in 2 minutes.
Quick Install
pip install django-revolution
# or
poetry add django-revolution
Add to Django
# settings.py
INSTALLED_APPS = [
'django_revolution',
# your existing apps
]
Test Installation
python manage.py revolution --status
Done! Django Revolution auto-installs dependencies when first used.
Verify Installation
Check Version & Status
python manage.py revolution --status
List Available Commands
python manage.py revolution --help
Install Dependencies
python manage.py revolution --install-deps
List Zones
python manage.py revolution --list-zones
Auto-Installed Dependencies
Automatically installed when needed:
@hey-api/openapi-ts
- TypeScript client generationopenapi-python-client
- Python client generationdrf-spectacular
- OpenAPI schema generation (via pip)
Pre-installed with package:
Django>=3.2
- Web frameworkdjangorestframework>=3.12.0
- API frameworkJinja2>=3.0.0
- Template enginePyYAML>=6.0
- YAML processingdjango-filter>=22.0.0
- Filtering supportdjangorestframework-simplejwt>=5.0.0
- JWT authentication
Advanced Installation
From Source
git clone https://github.com/markolofsen/django-revolution.git
cd django-revolution
pip install -e .
With Poetry
poetry add django-revolution
With Requirements File
# requirements.txt
django-revolution>=1.0.6
pip install -r requirements.txt
Troubleshooting
Node.js Not Found
Django Revolution auto-installs npm packages but requires Node.js:
# Ubuntu/Debian
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs
# macOS with Homebrew
brew install node
# Windows with Chocolatey
choco install nodejs
Permission Errors
# Fix npm permissions (Linux/macOS)
sudo chown -R $(whoami) ~/.npm
Import Errors
# Check installation
python -c "import django_revolution; print('✅ Django Revolution installed')"
# Reinstall if needed
pip uninstall django-revolution
pip install django-revolution
Generation Fails
# Check detailed status
python manage.py revolution --status
# Install dependencies manually
python manage.py revolution --install-deps
# Clean and retry
python manage.py revolution --clean
python manage.py revolution
Configuration
Optional Django Settings
# settings.py (optional customization)
DJANGO_REVOLUTION = {
'output_dir': 'openapi', # Default: 'openapi'
'auto_install_deps': True, # Default: True
'typescript_enabled': True, # Default: True
'python_enabled': True, # Default: True
'archive_clients': True, # Default: True
}
Environment Variables
# Skip auto-installation of dependencies
export DJANGO_REVOLUTION_NO_AUTO_INSTALL=1
# Custom output directory
export DJANGO_REVOLUTION_OUTPUT_DIR=/custom/path
System Requirements
Minimum Requirements
- Python 3.8+
- Django 3.2+
- 100MB free disk space
- Internet connection (for dependency installation)
Recommended
- Python 3.11+
- Django 4.2+
- Node.js 18+ (for TypeScript generation)
← Back to Home | Next: Usage → |