Adam Goldsmith
e14e57c39e
This primarily to make the list of members not block/slow down loading excessively, as it was currently doing
25 lines
561 B
Python
25 lines
561 B
Python
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",
|
|
]
|
|
widgets = {
|
|
"renter": autocomplete.ModelSelect2(
|
|
url="membershipworks:member-autocomplete",
|
|
attrs={
|
|
"data-placeholder": "-- No Renter --",
|
|
},
|
|
)
|
|
}
|