-
-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#116] Allow creating transitions without any approvals and introduce…
… TransitionMeta and Transition models
- Loading branch information
Showing
35 changed files
with
1,743 additions
and
708 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
.. _transition-meta-administration: | ||
|
||
Transition Meta Administration | ||
============================== | ||
+---------------------------+------------+----------+--------------------+-------------------------------------------+ | ||
| Field | Default | Optional | Format | Description | | ||
+===========================+============+==========+====================+===========================================+ | ||
| workflow | | False | | Choice | | Your model class along with the field | | ||
| | | | | of | | that you want to use this transition | | ||
| | | False | | Strings | | approval meta for. ``django-river`` | | ||
| | | | | | will list all the possible model and | | ||
| | | | | | fields you can pick on the admin page | | ||
+---------------------------+------------+----------+--------------------+-------------------------------------------+ | ||
| source_state | | False | State | | Source state of the transition | | ||
+---------------------------+------------+----------+--------------------+-------------------------------------------+ | ||
| destination_state | | False | State | | Destination state of the transition | | ||
+---------------------------+------------+----------+--------------------+-------------------------------------------+ | ||
|
||
|
||
.. toctree:: | ||
:maxdepth: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from django.contrib import admin | ||
from django import forms | ||
|
||
from river.models import TransitionMeta | ||
from river.models.transitionapprovalmeta import TransitionApprovalMeta | ||
|
||
|
||
class TransitionMetaForm(forms.ModelForm): | ||
class Meta: | ||
model = TransitionMeta | ||
fields = ('workflow', 'source_state', 'destination_state') | ||
|
||
|
||
class TransitionMetaAdmin(admin.ModelAdmin): | ||
form = TransitionMetaForm | ||
list_display = ('workflow', 'source_state', 'destination_state') | ||
|
||
|
||
admin.site.register(TransitionMeta, TransitionMetaAdmin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.