On Monday, November 21, 2011 03:46:49 AM Vikas Rawal wrote this and sent it to To: Django users <django-users@googlegroups.com>::
> I am new to django and to web programming. I am trying to build a > database application for entering/querying/viewing data from a mysql > database. The data entry module needs to have datagrids where users > can enter multiple rows of data belonging to a particular set. This is easy if you want rows of forms, and difficut if you want a full on spreadsheet like editorthat interactively updates as the user changes pages, sorts and searches. > Would be grateful for pointers to resources on the best way to > implement datagrids in django. Take a look at formsets for implementing row by row forms. The first line of the documentation says that formsets "...can be best compared to a data grid." https://docs.djangoproject.com/en/dev/topics/forms/formsets/ Once you've got a handle on that, take a look at a javascript tool like Datatables which you can start and get a lot of value (sorting, import, export, etc) by just adding to the table you build with the formset. After that you can implement serialization and paging using datatable to make your datagrid more flexible and improve the UI further. One of the good/bad things about django is that there seems to be an allergy to coupling tightly to a UI framework. When you are starting out, it's frusterating because doing ajax is time consuming and requires you learn a lot more than you expect. After you get to know django better you start to realize that right now there are soooooo many choices on the UI end are between the JavaScript library of the month, HTML5 and client side templating engines, things are changing so fast that it's pointless to commit to anything right now. Better to stay loosley coupled and flexible than obsolete in six months -- Mike
signature.asc
Description: This is a digitally signed message part.