Hi Alex/David,
> Alternatively, you can override the __unicode__ method of your model: > >class SizeOption(db.Model): > code = db.StringProperty(required = True) > html = db.StringProperty(required = True, multiline = True) > > def __unicode__(self): > return self.code > > You can use a custom ModelChoiceField and > override its > Nice one! The alternative is to define a __str__ method on your > SizeOption class, since that is what is used to render the options in > the default label_from_instance implementation. your suggestions to override methods worked a treat. Overriding at the Model level suits me very well as it gives me flexibility. One final question (I hope): what is the difference in overriding the __unicode__ and __str__ methods? Best regards, Martin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---