>> Thanks, Evert! I could check now that the table is correct - and,  
>> with
>> some experimenting, I found the mistake I had made too: I had, in
>> models.py, in class Admin, entered "ordering = ('nummer')" instead of
>> "ordering = ['nummer']".
>>
>> Perhaps somebody can explain why list_display and list_filter require
>> a tuple, and ordering and search_fields require a list?
>
> I don't know the options all by heart, but I'm guessing any iterable  
> will work.
> However, ('nummer') is not a tuple, it's a string (surrounded by  
> parenthesis).
> ('nummer',) , with the *extra* comma, is a single-element tuple, and  
> very likely will work (as well as ['nummer'] will).
> Easy (and probably common) mistake to make though.


And for the full record, I should add, that the admin/django/python  
was actually taking the first element of the iterable you used for  
ordering; of the string, that is: 'nummer'[0]  is indeed 'n', which  
confirms the error you got.


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

Reply via email to