Admin: add rule admin
This commit is contained in:
		
							
								
								
									
										20
									
								
								passbook/core/forms/rules.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								passbook/core/forms/rules.py
									
									
									
									
									
										Normal 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(), | ||||
|         } | ||||
		Reference in New Issue
	
	Block a user
	 Jens Langhammer
					Jens Langhammer