You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
499 B
Python

from django import forms
from .models import File, RuleAttribute, AttributeType
class FileUploadForm(forms.ModelForm):
class Meta:
model = File
fields = ['name', 'file']
class UploadCertificateForm(forms.Form):
certificate = forms.FileField()
class RuleAttributeForm(forms.ModelForm):
class Meta:
model = RuleAttribute
fields = ['attribute_type', 'operator', 'value']
attribute_type = forms.ModelChoiceField(queryset=AttributeType.objects.all())