devicehub-django/admin/forms.py

21 lines
642 B
Python
Raw Normal View History

2024-10-31 04:56:27 +00:00
from django import forms
from utils.device import create_annotation, create_doc, create_index
from utils.save_snapshots import move_json, save_in_disk
from django.forms import formset_factory
class CustomStatusLabelForm(forms.Form):
annotation_name = forms.CharField(
label="Annotation Name",
max_length=50,
widget=forms.TextInput(attrs={'class': 'form-control'})
)
annotation_state = forms.CharField(
label="Possible State",
max_length=50,
widget=forms.TextInput(attrs={'class': 'form-control'})
)
CustomStatusLabelFormSet = formset_factory(CustomStatusLabelForm, extra=1)