|
|
|
|
@ -83,6 +83,7 @@ class ProjectFilterRealtyForm(forms.ModelForm): |
|
|
|
|
self.fields['construction_type'].required = False |
|
|
|
|
|
|
|
|
|
self.fields['location'].queryset = Location.objects.root_nodes()[0].get_descendants() |
|
|
|
|
self.fields['building_classification'].queryset = BuildingClassfication.objects.root_nodes()[0].get_descendants() |
|
|
|
|
# self.fields['location'].queryset = Location.objects # Migrate with this enabled |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -150,8 +151,8 @@ class CustomerProjectEditForm(forms.ModelForm): |
|
|
|
|
|
|
|
|
|
class RealtyForm(forms.ModelForm): |
|
|
|
|
building_classification = TreeNodeChoiceField( |
|
|
|
|
BuildingClassfication.objects.all(), |
|
|
|
|
label="", initial='', |
|
|
|
|
BuildingClassfication.objects.exclude(name='_root'), |
|
|
|
|
label="ll", initial='', |
|
|
|
|
widget=forms.Select(attrs={ |
|
|
|
|
'class': 'selectpicker', |
|
|
|
|
'id': 'realtyBuildingClassificationId' |
|
|
|
|
|