core: Add Webhook Rule
This commit is contained in:
		| @ -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(), | ||||
|         } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Jens Langhammer
					Jens Langhammer