1. migajek NA
  2. django-tastypie-jqgrid

Wiki

Clone wiki

django-tastypie-jqgrid / Home

django-tastypie-jqgrid

django-tastypie-jqgrid project aims to fill the gap between jqGrid and Tastypie for Django.

please consider it pre-alpha *release as for now. The source is being ported and cleaned from more complex project, it'll support more features soon (like negated filters, "prebuilt" filters and maybe more)

Quick start

introduction

You should know the basics of django-tastypie (at least what is the Resource / ModelResource).

You have an application which defines Post model which has author (foreign key referencing User model), title, body and date_created.

steps:

  1. define your Resource (using JqGridResourceMixin, please see demo project, resources.py file)
  2. register it in the urls.py using the standard way (please refer to the django-tastypie docs!)
  3. define the view using JqGridMixin (see demo project, views.py) this is where you provide the columns definition and grid options
  4. define template. Load jqgird templatetag library, include required css & js with {% jqgrid_css_tags %} and {% jqgrid_js_tags %}. Finally, initialize the grid with {% jqgrid_init %}.

voilà

django-tastypie-jqgrid screen

Why

jqGrid is an excellent plugin built on top of jQuery for creating fully featured grids, with an AJAX being primary source of data.

django-tastypie is a powerful yet flexible library for creating RESTful APIs.

Both libraries needs a little customization to play nice together.

Requirements

You'll need to install

  • django (built & tested on Django 1.5)
  • django-tastypie (lastest repository version, 0.9.11 release is outdated!)

Updated