Code Monkey home page Code Monkey logo

django-jqgrid's People

Contributors

argaliev avatar doganmeh avatar gerry avatar mbanaouas avatar pommygranite avatar tubaman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-jqgrid's Issues

JqGrid class variable exra_config

Hi all,

extra_config is a class variable, and this can lead to a bug in the case of a page containing two jqGrid objects:

gridFoo = jqGrid()
gridFoo.extra_config['editurl'] = '/foo/edit'
gridBar = jqGrid()

print gridBar.get_config() will contain {'editurl': '/foo/edit'} even it's not concerned with.
So extra_config introduced some kind of persistence across of all objects while, IMHO, it was designed to serve each object separately.
This can be solved by making it an instance variable:

class JqGrid(object):
def init(self):
self.extra_config = {}

multipleGroup search?

Не реализован группировка при поиске, есть возможность сделать данный функционал?

json.loads() error in get_filters

I've found something wrong with the json.loads() in get_filters
I got this " 'module' object has no attribute 'loads' ", and then checked the "from django.core.serializers import json" to find no loads() function

my django version is old,1.2.3, maybe this leads to the error

I fixed the error with
import simplejson
filters = _filters and simplejson.loads(_filters)

get_json Error

Hi,

I was using this plugin and everything was working great until I needed to use Foreign Keys. Giving a field name as 'fkname__fieldname' would not populate that field in the grid. Everything else would populate fine. I inspected the json being sent to jqGrid, and it was always sending everything about my model, even though I only specified certain fields. But upon closer inspection I could see that my 'fkname__fieldname' field name wasn't present but 'fkname_id' was, even though it isn't in my model fields per se.

After stepping through the process to see what I was doing wrong I noticed in the get_json function:

193   def get_json(self, request):
194        paginator, page, items = self.get_items(request)
195        #Fix for queryset
196        if type(items) != type(ValuesQuerySet):
197            items = items.values()
198        data = {
199            'page': int(page.number),
200            'total': int(paginator.num_pages),
201            'rows': [obj for obj in items],
202            'records': int(paginator.count),
203            }
204        return json_encode(data)

Line 196: [if type(items) != type(ValueQuerySet):] is problematic.

>>> print type(items)
<class 'django.db.models.query.ValuesQuerySet'>
>>> print type(ValuesQuerySet)
<type 'type'>

If you remove the type() around ValuesQuerySet:

>>> print ValuesQuerySet
<class 'django.db.models.query.ValuesQuerySet'>

Now my Foreign Keys are showing up in my grid.

I haven't used the queryset parameter yet, but I imagine that this wouldn't hurt it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.