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
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,
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
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
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
5 matches
Mail list logo