Re: Select in a ModelForm

2009-04-24 Thread gontran
ld(max_length=30) > >       def __unicode__(self): >           return self.name > > 2009/4/24 gontran > > > > > > > Hello, > > > I have a problem with a select in a ModelForm. > > > My model: > > class Person(models.Model): > >

Re: Select in a ModelForm

2009-04-24 Thread wrzymar Gazeta.pl
Hello, Add co class Town function __unicode__ class Town(models.Model): id_town = models.AutoField(primary_key=True) name = models.CharField(max_length=30) def __unicode__(self): return self.name 2009/4/24 gontran > > Hello, > > I have a problem with a

Select in a ModelForm

2009-04-24 Thread gontran
Hello, I have a problem with a select in a ModelForm. My model: class Person(models.Model): first_name = models.CharField(max_length=30) last_name = models.CharField(max_length=30) id_town = foreignyKey(Town) class Town(models.Model): id_town = models.AutoField(primary_key=True