cmsmanage/rentals/forms.py

26 lines
582 B
Python
Raw Normal View History

from django import forms
2024-05-04 16:38:51 -04:00
from dal.autocomplete import ModelSelect2
from rentals.models import LockerInfo
class LockerInfoForm(forms.ModelForm):
class Meta:
model = LockerInfo
fields = [
"blind_code",
"bitting_code",
"renter",
"reserved",
"notes",
]
widgets = {
2024-05-04 16:38:51 -04:00
"renter": ModelSelect2(
url="membershipworks:member-autocomplete",
attrs={
"data-placeholder": "-- No Renter --",
},
)
}