def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.fields['location'] = forms.ModelChoiceField(
required=False,
queryset=LocationInfo.objects.all(),
widget=autocomplete.ModelSelect2(url=reverse_lazy('autocomplete:locations'))
) def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.fields['location'] = forms.ModelChoiceField(
required=False,
queryset=LocationInfo.objects.all(),
widget=autocomplete.ModelSelect2(url=reverse_lazy('autocomplete:locations'))
)
self.fields['custom_affiliation'].help_text = dedent(
'''The venues in an affiliated venue group will be marketed on this
venue’s Resy.com page. Set this value to the custom affiliation group "%s"
to explicitly not associate this with any other Venue.
Leave this value empty if you want the default behavior of showing venues
in the same Location and venue_group.
''' % VenueCustomAffiliation.EMPTY_GROUP_NAME
)tom_affiliation'].help_text = dedent(
'''The venues in an affiliated venue group will be marketed on this
venue’s Resy.com page. Set this value to the custom affiliation group "%s"
to explicitly not associate this with any other Venue.
Leave this value empty if you want the default behavior of showing venues
in the same Location and venue_group.
''' % VenueCustomAffiliation.EMPTY_GROUP_NAME
)