Im using appengine and the appenginepatch (so my issue could be related to that)
I have set up a model with a property that has several choices but when trying to display on a form or via admin interface I am getting an error:
Property mode is 'o'; must be one of (('s', 'Single'), ('m', 'Multi'), ('o', 'Ordered'))
This is my code:
MODES = (
('s', 'Single'),
('m', 'Multi'),
('o', 'Ordered')
)
class X(search.SearchableModel):
mode = models.StringProperty( default='s', choices=MODES )
if I set it to use Integers (as below) the admin form (and my own ModelForm) shows each option for the property as the whole tuplet so that when I select and try to save I get the error that I'm not saving an Integer value
MODES = (
(0, 'Single'),
(1, 'Multi'),
(2, 'Ordered')
)
class X(search.SearchableModel):
mode = models.IntegerProperty( default=0, choices=MODES )
Is there something special I have to do?