Hi
I'm working on a registration form which is based, among the others,
on this model:

class City(models.Model):
    prov_name =
models.CharField(verbose_name='Provincia',max_length=50)

(obviously i'm writing down just the field i'm interested in to save
some space..)

In the form i have to put a select field for the cities
(form.forms.ModelChoiceField with a queryset on City) and also a
select field for prov_name, in order to populate the list of choices..

Surely a different model (Provinces, and then a foreignkey on City
prov_name) would be easier to manage but i can't alter the schema of
the database i'm using, so i have to find workarounds.. And i can't do
a modelChoiceField based on prov_name because there's no primary key,
it's just a field..

Do someone have an idea on how to handle this?

Thank you a lot!


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
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