cmsmanage/rentals/forms.py

26 lines
582 B
Python
Raw Normal View History

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