Skip to main content

This package provides easy integration between Django REST framework and DevExtreme Data Grid

Project description

drf-dx-datagrid

Overview

This package provides easy integration between Django REST framework and DevExtreme Data Grid

Install drf-dx-datagrid, replace classname ModelViewSet to DxModelViewSet in your django project and it will support devextreme load options and will return a JSON structure that is fully compatible with what Data Grid expects. It handles grouping, paging, filtering and ordering on serverside.

Configuration

Define your ModelViewSet classes as on this example:

from drf_dx_datagrid import DxModelViewSet

class MyModelViewSet(DxModelViewSet):
    serializer_class = MyModelSerializer
    queryset = core.models.MyModel.objects.all()

JS example:

import CustomStore from 'devextreme/data/custom_store';
import axios from "axios";

export const getUpsStore = (my_url, customStoreOptions) => {
    const load = (loadOptions) => {
        return axios(`${my_url}`, {
                params: loadOptions
            }
        ).then((response) => response.data
        )
    };
    return new CustomStore({...customStoreOptions, load: load});
}

Project details


Release history Release notifications

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for drf-dx-datagrid, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size drf_dx_datagrid-0.1-py3-none-any.whl (6.1 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size drf_dx_datagrid-0.1.tar.gz (4.1 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page