flows: FlowStageBinding group Stage by type
This commit is contained in:
parent
94281bee88
commit
b26882a450
|
@ -3,7 +3,8 @@
|
||||||
from django import forms
|
from django import forms
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from passbook.flows.models import Flow, FlowStageBinding
|
from passbook.flows.models import Flow, FlowStageBinding, Stage
|
||||||
|
from passbook.lib.widgets import GroupedModelChoiceField
|
||||||
|
|
||||||
|
|
||||||
class FlowForm(forms.ModelForm):
|
class FlowForm(forms.ModelForm):
|
||||||
|
@ -35,6 +36,8 @@ class FlowForm(forms.ModelForm):
|
||||||
class FlowStageBindingForm(forms.ModelForm):
|
class FlowStageBindingForm(forms.ModelForm):
|
||||||
"""FlowStageBinding Form"""
|
"""FlowStageBinding Form"""
|
||||||
|
|
||||||
|
stage = GroupedModelChoiceField(queryset=Stage.objects.all().select_subclasses(),)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
|
||||||
model = FlowStageBinding
|
model = FlowStageBinding
|
||||||
|
|
Reference in New Issue