Enterprise-grade, database-driven form builder with approval workflows and external data integration
Project description
Django Forms Workflows
Enterprise-grade, database-driven form builder with approval workflows and external data integration
Overview
Django Forms Workflows bridges the gap between simple form libraries (like Crispy Forms) and expensive SaaS solutions (like JotForm, Formstack). It provides:
- ๐ Database-Driven Forms - Forms stored in database, not code
- ๐ Approval Workflows - Multi-step approval engine with notifications
- ๐ External Data Integration - Pull data from LDAP, databases, APIs
- ๐ Enterprise Security - LDAP/AD authentication, complete audit trails
- ๐ Self-Hosted - No SaaS fees, full data control
- ๐จ Beautiful UI - Built on Crispy Forms and Bootstrap
Key Features
๐ฏ No-Code Form Creation
Business users can create and modify forms through Django Admin without touching code:
- Drag-and-drop field ordering
- 15+ field types (text, select, date, file upload, etc.)
- Validation rules (required, regex, min/max, etc.)
- Conditional field visibility
- Custom help text and placeholders
๐ Powerful Approval Workflows
Built-in multi-step approval engine:
- Sequential or parallel approvals
- Configurable approval logic (any/all approvers)
- Email notifications and reminders
- Complete audit trail
- Approval delegation
๐ Configurable Prefill Sources
Automatically populate form fields from external systems with flexible, reusable configurations:
- User Model - Current user's profile data (email, name, username)
- LDAP/Active Directory - Enterprise directory attributes (department, title, manager)
- External Databases - Pull from any SQL database with custom field mappings
- REST APIs - Integrate with external services
- System Values - Current date/time, previous submissions
New in v1.1: Prefill sources are now configurable database records with:
- โ Dropdown Selection - Form builders select from pre-configured sources
- โ Custom Field Mappings - Configure database lookup fields for different environments
- โ Reusable Configurations - Define once, use across multiple forms
- โ Centralized Management - All sources managed in Django Admin
Example database prefill configuration:
# Admin โ Prefill Sources โ Add Prefill Source
Name: Student - First Name
Source Type: Database
DB Schema: dbo
DB Table: STBIOS
DB Column: FIRST_NAME
DB Lookup Field: ID_NUMBER # Column to match against
DB User Field: employee_id # UserProfile field to use for lookup
See Prefill Sources Guide for detailed configuration.
๐ Post-Submission Actions (NEW)
Automatically update external systems with form data after submission or approval:
- Database Updates - Write data back to external databases with custom field mappings
- LDAP Updates - Update Active Directory attributes
- API Calls - Send data to external services via HTTP APIs
- Custom Handlers - Execute custom Python code for complex integrations
Trigger Types:
- โ On Submit - Execute immediately when form is submitted
- โ On Approve - Execute when form is approved
- โ On Reject - Execute when form is rejected
- โ On Complete - Execute when workflow is complete
Features:
- Conditional execution based on form field values
- Automatic retries with configurable max attempts
- Error handling (fail silently or block submission)
- Execution ordering for dependent actions
- Complete audit logging
Example database update configuration:
# Admin โ Post-Submission Actions โ Add
Name: Update HR Database
Action Type: Database Update
Trigger: On Approval
DB Field Mappings:
[
{"form_field": "email", "db_column": "EMAIL_ADDRESS"},
{"form_field": "phone", "db_column": "PHONE_NUMBER"}
]
See Post-Submission Actions Guide for detailed configuration.
๐ Cross-Instance Form Sync (Push / Pull)
Move form definitions between environments (test โ staging โ prod) entirely from the Django Admin โ no shell access or kubectl exec required:
- Pull from Remote โ connect to any configured remote instance, preview available forms, and import selected ones with one click
- Push to Remote โ select forms in the changelist and push them to any destination instance
- Import / Export JSON โ download a portable
.jsonsnapshot or upload one from another instance - Conflict modes โ
update(overwrite),skip(leave untouched), ornew_slug(create a copy) FORMS_SYNC_REMOTESsetting โ pre-configure named instances (URL + token) so admins pick from a dropdown instead of typing credentials every time- HTTP endpoints (
/forms-sync/export/and/forms-sync/import/) protected by a shared Bearer token (FORMS_SYNC_API_TOKEN) for scripted / CI use
๐ Enterprise-Ready Security
- LDAP/Active Directory authentication
- Role-based permissions
- Complete audit logging (who, what, when, where)
- CSRF protection
- SQL injection prevention
- File upload validation
๐ Comprehensive Audit Trail
Track everything for compliance:
- Form creation/modification
- Form submissions
- Approval decisions
- Status changes
- Field value changes
- User actions with IP addresses
Quick Start
Installation
pip install django-forms-workflows
Basic Setup
- Add to
INSTALLED_APPS:
INSTALLED_APPS = [
# ...
'crispy_forms',
'crispy_bootstrap5',
'django_forms_workflows',
# ...
]
- Configure settings:
# Crispy Forms
CRISPY_ALLOWED_TEMPLATE_PACKS = "bootstrap5"
CRISPY_TEMPLATE_PACK = "bootstrap5"
# Forms Workflows
FORMS_WORKFLOWS = {
'ENABLE_APPROVALS': True,
'ENABLE_AUDIT_LOG': True,
'ENABLE_FILE_UPLOADS': True,
'MAX_FILE_SIZE': 10 * 1024 * 1024, # 10MB
}
- Run migrations:
python manage.py migrate django_forms_workflows
- Include URLs:
urlpatterns = [
path('forms/', include('django_forms_workflows.urls')),
]
- Create your first form in Django Admin!
Architecture
graph TB
subgraph UI["User Interface"]
FB["Form Builder<br/>(Admin)"]
FV["Form Viewer<br/>(End User)"]
AU["Approval UI<br/>(Approvers)"]
end
subgraph Django["Django Application"]
subgraph DSL["Data Source Abstraction Layer"]
LDAP["LDAP<br/>Source"]
DB["Database<br/>Source"]
API["API<br/>Source"]
end
end
subgraph External["External Systems"]
AD["Active<br/>Directory"]
Legacy["Legacy<br/>Databases"]
ExtAPI["External<br/>APIs"]
end
UI --> Django
DSL --> External
style UI fill:#e1f5ff
style Django fill:#fff4e1
style DSL fill:#ffe1f5
style External fill:#e1ffe1
Use Cases
Perfect for:
- HR Departments - Employee onboarding, time-off requests, expense reports
- IT Departments - Access requests, equipment requests, change management
- Finance - Purchase orders, invoice approvals, budget requests
- Education - Student applications, course registrations, facility requests
- Healthcare - Patient intake, referrals, insurance claims
- Government - Permit applications, FOIA requests, citizen services
Documentation
- Installation Guide
- Configuration Guide
- Data Sources Guide
- Workflow Guide
- API Reference
- Architecture Overview
Comparison
| Feature | Django Forms Workflows | Crispy Forms | FormStack | Django-Formtools |
|---|---|---|---|---|
| Database-driven forms | โ | โ | โ | โ |
| No-code form creation | โ | โ | โ | โ |
| Self-hosted | โ | โ | โ | โ |
| Approval workflows | โ | โ | โ ๏ธ | โ |
| External data prefill | โ | โ | โ ๏ธ | โ |
| LDAP/AD integration | โ | โ | โ | โ |
| Audit trail | โ | โ | โ | โ |
| Open source | โ | โ | โ | โ |
Requirements
- Python 3.10+
- Django 5.1+
- PostgreSQL 12+ (recommended) or MySQL 8.0+
- Celery 5.0+ (for background tasks)
- Redis/Valkey (for Celery broker)
Contributing
We welcome contributions! Please see CONTRIBUTING.md for details.
License
GNU Lesser General Public License v3.0 (LGPLv3) - see LICENSE for details.
Support
- ๐ Documentation
- ๐ฌ Discussions
- ๐ Issue Tracker
Roadmap
Phase 1: Core (Current)
- Database-driven form definitions
- Dynamic form rendering
- Approval workflows
- LDAP integration
- Database prefill
- Audit logging
Phase 2: Enhanced UX
- Form builder UI (drag-and-drop)
- Conditional field visibility (client-side)
- File upload validation
- Form templates/cloning
- Dashboard analytics
Phase 3: Advanced Features
- Cross-instance form sync (push/pull) via Admin UI and HTTP API
- REST API for form submission
- Webhook support
- Custom field types (signature, location, etc.)
- Advanced reporting
- Form versioning
Phase 4: Enterprise
- Multi-tenancy support
- SSO integration (SAML, OAuth)
- Advanced RBAC
- White-label support
- Plugin marketplace
Credits
Built with โค๏ธ by the Django community.
Special thanks to:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_forms_workflows-0.14.14.tar.gz.
File metadata
- Download URL: django_forms_workflows-0.14.14.tar.gz
- Upload date:
- Size: 223.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bab4b2f0accc63c667f0b7083450069ab4f6d1e02c1330d7163f210795a7e600
|
|
| MD5 |
6ef0df2b80c72169e24c3f554cbb47d3
|
|
| BLAKE2b-256 |
d0189b6f96f3a4b1cc0c384d01d66fa0e97f1e46cd753ab4b49e044b09525f42
|
File details
Details for the file django_forms_workflows-0.14.14-py3-none-any.whl.
File metadata
- Download URL: django_forms_workflows-0.14.14-py3-none-any.whl
- Upload date:
- Size: 272.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d3242556044681c1b89c1ac9364ca5b1ba27e68762d21b8a63f161e4930b3d6
|
|
| MD5 |
d711e9472031263b2c5dde1c0a9318dd
|
|
| BLAKE2b-256 |
781c0098d723b2cd589d5478e439d7ef9b9dfd26c763c6cf157a6e1f2ef6eaf8
|