On Mon, Dec 29, 2008 at 12:24 AM, Martynas Brijunas <mbri...@gmail.com> wrote:
>> 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. Oops. I read Alex's email too quickly. He suggests exactly what I mentioned, except using __unicode__ instead of __str__. > 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? Unless you're actually dealing with Unicode text, there won't be any practical difference. Check the Python docs for the full story. Dave. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---