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

Currently it supports:

  • sorting
  • paging
  • toolbar filtering (except negated operators as for now)
  • JavaScript generation (no JS knowledge needed for basic usage)
  • form editing (editing in a popup)
    • modifying existing record
    • creating new records
    • deleting records
  • DatePicker integration (using DateColumn) 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)


It's pre-alpha release, yet it is supposed to be functional. The API might (and will) change a lot. If you do want to use it in the current version, the only way is to do hg clone


The code requires django-tastypie (current repository version, as of 2013-01-11, since the latest release - 0.9.11 - is a bit outdated.) Demo project requires Django 1.5, it should however be possible to run on older versions.


django-tastypie-jqgrid screen django-tastypie-jqgrid screen

demo code

the code used for achieving the grid shown in the screenshot was as simple as:

class CustomPostsGridView(JqGridMixin, TemplateView):
    template_name = "posts.html"
    grid_resource = PostResource
    colmodel = [
        Column(name = 'id', label = '#', editable = False, width = 25),
        Column(name = 'title', label = _('Post title'), width = 230),
        Column(name = 'author_name', label = _('Author name'), width = 230),
        DateColumn(name = 'date_created', label = _('Date of publication'), width = 100, 
                    datepicker_edit = True, datepicker_search_tb = True),
        Column(name = 'body', label = _('Post body'), width = 430),

    filtering_toolbar = True
    columns_editable_by_default = True    
    pager_selector = '#gridpager'
    pager_options = {'search': False} # hidden search button

    def get_grid_options(self, user):
        return {                
                'scroll': False,
                'viewrecords': True


{% load jqgrid %}
{% block extra_head %}
    {% jqgrid_css_tags jquery_ui=True %}
    {% jqgrid_js_tags jquery_ui=True locale='pl'%}          
{% endblock %}
{% block content %} 
    <div class="wrapper">
        <table id="my-grid"></table>
        <div id="gridpager"></div> 
    {% jqgrid_init "#my-grid" %}
{% endblock %}