Did I find the right examples for you? yes no

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

src/a/p/apidev-sanza-3.0.4/sanza/Crm/forms.py   apidev-sanza(Download)
from django.contrib.auth.models import User
from sanza.Crm import models
from sanza.Crm.widgets import CityAutoComplete, EntityAutoComplete, OpportunityAutoComplete, ContactAutoComplete
from sanza.Crm.settings import NO_ENTITY_TYPE
from sanza.Crm.utils import get_default_country
    def __init__(self, *args, **kwargs):
        super(SelectEntityForm, self).__init__(*args, **kwargs)
        self.fields["entity"].widget = EntityAutoComplete(
            attrs={'placeholder': _(u'Enter the name of an entity'), 'size': '50', 'class': 'colorbox'})
    option = forms.ChoiceField(label=_(u"What to do?"))
    entity = forms.IntegerField(label=_(u"Which one?"), required=False, widget=EntityAutoComplete(
        attrs={'placeholder': _(u'Enter the name of the entity'), 'size': '50', 'class': 'colorbox'}))
    def __init__(self, contact, *args, **kwargs):