Admin: add rule admin

This commit is contained in:
Jens Langhammer
2018-11-26 22:08:48 +01:00
parent 2aa12801a8
commit caf6580ccb
6 changed files with 166 additions and 5 deletions

View File

@ -0,0 +1,20 @@
"""passbook rule forms"""
from django import forms
from passbook.core.models import FieldMatcherRule
class FieldMatcherRuleForm(forms.ModelForm):
"""FieldMatcherRule Form"""
class Meta:
model = FieldMatcherRule
fields = ['name', 'action', 'negate', 'order',
'user_field', 'match_action', 'value', ]
widgets = {
'name': forms.TextInput(),
'user_field': forms.TextInput(),
'value': forms.TextInput(),
}