hedronist wrote: > Google is your friend. > > http://www.google.com/search?q=javascript+table+sort > > I particularly like jQuery as a Javascript library, so I suggest > looking at: > http://tablesorter.com/docs/ > Sorry, I already ran that google search and found that same widget, hence my posting to a list. It can sort data by certain criteria that is already there very nicely. I want a user input widget so the user can tell my app what order they want something in. I found several sorting widgets that can do what that one does, but I have yet to find a widget that can take user input on manual sorting. >> I am mostly interested in how a sorting front-end will be represented in >> my database-- is the IntegerField a good way to do it? Should the >> javascript widget assign a value to a hidden field that gets parsed on >> the server side? Is there a 'right' or 'clean' way to accomplish this? >> > > Huh? I don't really know what that means, but I'll try to respond to > what I *think* you meant. > > I'll clarify with an example: I have 4 objects: apple banana orange pear
Django can sort these by different criteria very easily-- date added, alphabetical, etc... I want to give my users the ability to drag the objects around (or use some other method) to define a new sort order. So I decide I like pears, but not bananas, so I put pears first and bananas last pear apple orange banana This sort order has nothing to do with the data. I want to save this order in the database, so it can display them in that order. I have a very simple content management app I've added to a project, and each page has a tab in the menu. If I add 'home' second, and I want it to be first, I have to tell django about my sorting preference somehow. So my question still stands as to how should this manual sort order be represented in my database, and how should/would a frontend talk to the database to feed it the sort information. Thanks for the reply! Jeff Anderson
signature.asc
Description: OpenPGP digital signature

