Hi,

I'm using 'object_list' for getting object list and now I need to add
column sorting in my table.

I am new to both python & Django, and read
contrib/admin/teamplates,tamplatetags many times and can't understand
how
pagination & column sorting works in Admin panel.

Also tried a javascript 'sorttables' from
https://www.robohead.net/galaxyWebResources/js/sortTables.js which is a
good solution
but it only sorts a displayed table (on client side), so it does not
work
well when using pagination.

Is anybody of some source where templatetag has been used for column
sorting ? (not talking about django admin, it's too hard coded for me
at least
at the moment).

If generic views are the problem here I can ommit it, though pagination
will not be so easy then.

I was considering using a schema below:

model name "Test" with fields "name","date"
url: /Test/byName/, /Test/ByDate/ all pointing to my generic view with
extra_context  sort variable defined, and then using dictsort| tag .
More.. I've tried with request.GET. dict to get &sort= variable,
but it's too complicated as I'm loosing it when going to next page.

Seems like templatetag is the best solution. Anyone doing sort with
templatetag ?

Thanks,

Robert


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

Reply via email to