Initial import of the document states app

This commit is contained in:
Roberto Rosario
2015-01-13 04:13:49 -04:00
parent 88cd49e08c
commit 8ff3747a15
19 changed files with 1032 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
from __future__ import unicode_literals
from django import forms
from django.utils.translation import ugettext_lazy as _
from .models import WorkflowState, WorkflowTransition
class WorkflowStateForm(forms.ModelForm):
class Meta:
fields = ('initial', 'label')
model = WorkflowState
class WorkflowTransitionForm(forms.ModelForm):
class Meta:
# TODO: restrict states to the ones of this workflow
fields = ('label', 'origin_state', 'destination_state')
model = WorkflowTransition