Encapsulates the bpmn-js modeler into a Django widget. This is not part of the oficial bpmn-io initiative. Take a look at their license, specially the explicit forbidden to hide their watermark.
Install the dependency pip install django-bpmn
Add 'django_bpmn' to INSTALLED_APPS
In a text field in your form add the widget=BPMNWidget
from django import forms
from django_bpmn.widget import BPMNWidget
from sample.models import BPMN
class BPMNForm(forms.Form):
diagram = forms.CharField(widget=BPMNWidget)
class BPMNModelForm(forms.ModelForm):
diagram = forms.CharField(widget=BPMNWidget)
class Meta:
model = BPMN
exclude = ()
The model attibute that store the attribute should be a blob type like TextField.
from django.db import models
class BPMN(models.Model):
diagram = models.TextField('Diagram')
docker run -p 8000:8000 jplobianco/django-bpmn-sample
Access your browser at localhost:8000.