Re: IntegerField with choices raising an TypeError

2008-05-22 Thread Jashugan
In the meantime I did the following: def save(self): try: self.score = int(self.score) except: pass super(Entry, self).save() --~--~-~--~~~---~--~~ You received this message because you are subscribed to the G

Re: IntegerField with choices raising an TypeError

2008-05-22 Thread Jashugan
On May 22, 6:29 am, "Scott Moonen" <[EMAIL PROTECTED]> wrote: > I suspect your problem may be due to the fact that your display value for 3 > is a number rather than a string.  Try changing: > >    CHOICES = [(1, '1'), (2, '2'), (3, 3), (4, '4'), (5, '5')] > > to > >    CHOICES = [(1, '1'), (2,

Re: IntegerField with choices raising an TypeError

2008-05-22 Thread Scott Moonen
I suspect your problem may be due to the fact that your display value for 3 is a number rather than a string. Try changing: CHOICES = [(1, '1'), (2, '2'), (3, 3), (4, '4'), (5, '5')] to CHOICES = [(1, '1'), (2, '2'), (3, '3'), (4, '4'), (5, '5')] -- Scott On Wed, May 21, 2008 at 7:33

Re: IntegerField with choices raising an TypeError

2008-05-22 Thread Adi J. Sieker
Jashugan wrote: > Hello I have the following code in my model: > > class SomeMode(models.Model): > > CHOICES = [(1, '1'), (2, '2'), (3, 3), (4, '4'), (5, '5')] > > score = models.IntegerField(choices=CHOICES) > > > When I change the score in the admin interface it throws this error: > > an

IntegerField with choices raising an TypeError

2008-05-21 Thread Jashugan
Hello I have the following code in my model: class SomeMode(models.Model): CHOICES = [(1, '1'), (2, '2'), (3, 3), (4, '4'), (5, '5')] score = models.IntegerField(choices=CHOICES) When I change the score in the admin interface it throws this error: an integer is required I think this