On Thu, 05 Apr 2007 14:10:05 +0800, Russell Keith-Magee wrote: > On 4/5/07, TaMeR <[EMAIL PROTECTED]> wrote: > >> class Meta: >> ordering = ('code') > > You have been bitten by a very common Python error: > > ('code') defines a string > ('code',) defines a tuple containing a single element, that is a string.
Finally, ['code'] defines a list containign a single element. IMO it's much easier to type, and easier/less confusing for humans unfamiliar with Python to parse and understand. :) -- Sam Morris http://robots.org.uk/ PGP key id 1024D/5EA01078 3412 EA18 1277 354B 991B C869 B219 7FDB 5EA0 1078 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---