class CustomBarModelForm(forms.ModelForm):


    class Meta:
        model = Bar

def __init__(self, *args, **kwargs):
    super(CustomBarModelForm, self).__init__(*args, **kwargs)
self.fields['foo'].queryset = Foo.objects.filter(title__isnull=False)


class BarAdmin(admin.ModelAdmin):
    pass
filtering dropdown values in django admin