core: Add Webhook Rule

This commit is contained in:
Jens Langhammer
2018-11-27 16:23:04 +01:00
parent cde35515c7
commit 4b047802c0
5 changed files with 130 additions and 1 deletions

View File

@ -2,7 +2,7 @@
from django import forms
from passbook.core.models import FieldMatcherRule
from passbook.core.models import FieldMatcherRule, WebhookRule
class FieldMatcherRuleForm(forms.ModelForm):
@ -18,3 +18,19 @@ class FieldMatcherRuleForm(forms.ModelForm):
'user_field': forms.TextInput(),
'value': forms.TextInput(),
}
class WebhookRuleForm(forms.ModelForm):
"""WebhookRuleForm Form"""
class Meta:
model = WebhookRule
fields = ['url', 'method', 'json_body', 'json_headers',
'result_jsonpath', 'result_json_value', ]
widgets = {
'json_body': forms.TextInput(),
'json_headers': forms.TextInput(),
'result_jsonpath': forms.TextInput(),
'result_json_value': forms.TextInput(),
}