Did I find the right examples for you? yes no

All Samples(8)  |  Call(5)  |  Derive(0)  |  Import(3)

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
            self.country_id = get_default_country().id
 
        self.fields['city'].widget = CityAutoComplete(attrs={'placeholder': _(u'Enter a city'), 'size': '80'})
 
        self.fields['country'].choices = [(0, '')]+[(z.id, z.name) for z in models.Zone.objects.filter(parent__isnull=True).order_by('name')]
class EntityForm(ModelFormWithCity):
    city = forms.CharField(
        required = False, label=_(u'City'),   
        widget = CityAutoComplete(attrs={'placeholder': _(u'Enter a city'), 'size': '80'})
    )
class ContactForm(ModelFormWithCity):
    city = forms.CharField(
        required = False, label=_(u'City'),   
        widget = CityAutoComplete(attrs={'placeholder': _(u'Enter a city'), 'size': '80'})
    )

src/a/p/apidev-sanza-3.0.4/sanza/Profile/forms.py   apidev-sanza(Download)
# -*- coding: utf-8 -*-
 
import floppyforms as forms
from sanza.Crm.forms import ModelFormWithCity, FormWithCity
from sanza.Crm.widgets import CityAutoComplete
class ProfileForm(ModelFormWithCity):
 
    city = forms.CharField(
        required = False, label=_(u'City'),   
        widget = CityAutoComplete(attrs={'placeholder': _(u'Enter a city'), 'size': '80'})

src/a/p/apidev-sanza-3.0.4/sanza/Emailing/forms.py   apidev-sanza(Download)
from django.template.loader import get_template
from django.core.mail import send_mail, EmailMessage
from sanza.Crm.widgets import CityAutoComplete
from django.contrib import messages
import urllib2, re
class SubscribeForm(ModelFormWithCity):
    city = forms.CharField(
        required = False, label=_(u'City'),   
        widget = CityAutoComplete(attrs={'placeholder': _(u'Enter a city'), 'size': '80'})
    )