Hi, I have a community website where is important set the city of
difierent things (events, news, etc...).

So, I have this form:

class CityForm(forms.Form):
    country = forms.ModelChoiceField(queryset=Country.objects.all(),
help_text=u'País del evento. Para eventos en internet o en varias
ciudades no elegir ninguna.', required=True, label=u'País')
    state = forms.CharField(max_length=50, help_text=u'Departamento
del evento', required=True, label=u'Departamento / Estado')
    city = forms.CharField(max_length=50,help_text=u'Ciudad del
evento.', required=True, label=u'Ciudad')

    def getCity(self,depto,cityName):
        depto = State.objects.filter(id=int(depto))[0]

        if City.objects.filter(name=cityName).count()==0:
            City(name=cityName,depto=depto).save()

        return City.objects.filter(name=cityName)[0]

    def getDepto(self,country,deptoName):
        pais = Country.objects.filter(id=int(country))[0]

        if State.objects.filter(name=deptoName).count()==0:
            State(name=deptoName,country=pais).save()

        return State.objects.filter(name=deptoName)[0]

However, if I subclass this form this fields get on TOP of it (I
prefer have it on bottom or in the middle). Exist a way to control
this?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to