Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JqGrid class variable exra_config #7

Open
mbanaouas opened this issue Dec 1, 2013 · 0 comments
Open

JqGrid class variable exra_config #7

mbanaouas opened this issue Dec 1, 2013 · 0 comments

Comments

@mbanaouas
Copy link
Contributor

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 = {}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant