Stodge wrote:
> Thanks. I have the DataTables plugin working so I can filter my
> records. Now I just need to work out how to select specific ones from
> the table and work with them.
> 

Well, that depends a bit on what you want. if you, say, used javascript
 to directly populate a field in a html form when the user clicks on a
row in the datatable, you're pretty firmly tied to functioning
javascript, but it should be straightforward enough.
http://www.datatables.net/examples/example_select_single_row.html

One thing to consider could be actual click-through html links on each
row in the table that go to a small helper view taking the ticket and
relevant requirement as parameters that performs the desired
association, possibly after prompting for confirmation, then redirect
back to the main page.  At first glance, that might seem unpleasant,
because the user apparently navigates away - However once you have got
that basic interaction working, you can go back and use jquery to
intercept clicking the link and make the request in an ajax manner so
that the user doesn't navigate away from the main page.  Django has
request.is_ajax() you can use in the helper view to detect and respond
appropriately to ajax requests from jquery.   This approach has the
advantage of progressive enhancement (or graceful degradation) like
datatables itself - the ui doesn't become unusable just because
javascript is disabled, it just gets clunkier.  It also means you can
focus on getting something working , then worry about javascript
wierdness.  The ticket object also kinda has to already exist for this
approach to be simple, but you can have separate "ticket add" and
"ticket edit" views with the former only asking for a subset of
essential fields, say.














--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.


Reply via email to