def __init__(self, *args, **kwargs):
        super(InstructorsForm, self).__init__(*args, **kwargs)

        # dynamically build choices for country field
        only = Airport.objects.distinct().values_list('country', flat=True)
        only = [c for c in only if c]
        countries = Countries()
        countries.only = only

        choices = list(countries)
        self.fields['country'] = forms.MultipleChoiceField(choices=choices,
                                                           required=False)

        self.helper = FormHelper(self)
        self.helper.form_class = 'form-inline'
        self.helper.form_method = 'get'
        self.helper.layout = Layout(
            Div(
                Div(
                    'latitude',
                    'longitude',
                    css_class='panel-body'
                ),
                css_class='panel panel-default ',
            ),
            HTML('<p>OR</p>'),
            Div(
                Div(
                    'airport',
                    css_class='panel-body'
                ),
                css_class='panel panel-default ',
            ),
            HTML('<p>OR</p>'),
            Div(
                Div(
                    'country',
                    css_class='panel-body'
                ),
                css_class='panel panel-default ',
            ),
            'gender',
            'lessons',
            'instructor_badges',
            FormActions(
                Submit('submit', 'Submit'),
            ),
        )
Usage:
dataset/ETHPy150Open swcarpentry/amy/workshops/forms.py/InstructorsForm.__init__--crossover with--dataset/ETHPy150Open nitely/Spirit/spirit/core/utils/__init__.py/pushd