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 integer is required
>
> I think this is a bug, but I have only been working with Django for
> the last few days, so wasn't sure. I quickly searched the Trac ticket,
> but didn't find any open tickets related to this. Is this expected
> behavior?
>
>   
works fine here.
I define my choiches like this.

APPLICATION = 1
CUSTOMER = 2
EXCUSTOMER = 3

CUSTOMER_STATES = (
    (APPLICATION, 'Anfrage'),
    (CUSTOMER, 'Jugendlicher'),
    (EXCUSTOMER, 'Ehemaliger'),
)

adi

-- 
Adi J. Sieker         mobile: +49 - 178 - 88 5 88 13
Freelance developer   skype:  adijsieker
SAP-Consultant        web:    http://www.sieker.info/profile
                      openbc: https://www.openbc.com/hp/AdiJoerg_Sieker/

--~--~---------~--~----~------------~-------~--~----~
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