Did I find the right examples for you? yes no

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

src/a/p/apidev-sanza-3.0.4/sanza/Crm/search_forms.py   apidev-sanza(Download)
from django.contrib.auth.models import User
from django.db.models import Q, Count
from sanza.Crm.widgets import CityNoCountryAutoComplete, GroupAutoComplete
from sanza.Crm.utils import get_default_country
 
    def __init__(self, *args, **kwargs):
        super(BaseCitySearchForm, self).__init__(*args, **kwargs)
        qs = models.City.objects.order_by('name') 
        field = forms.ModelChoiceField(qs, label=self._label,
            widget = CityNoCountryAutoComplete(attrs={'placeholder': _(u'Enter a city'), 'size': '80'})