Initialize (executing the constructor) for the PGNodeModule needs to be

called while initialing the CollectionNodeModule, as
super(..).__init__(..) does not call __init__ function of all parent
classes. Please refer to method resolution order (MRO) in python for
more information.

This patch also includes some typo resolution in PGNdoeModule. Also,
removed the AddAttr(..) at the moment, because - it is not going
anywhere at the moment.
This commit is contained in:
Ashesh Vashi
2016-02-18 17:02:52 +05:30
parent 2233583dbd
commit 3d134a3d07
2 changed files with 17 additions and 44 deletions

View File

@@ -11,9 +11,9 @@ import six
from abc import ABCMeta, abstractmethod
from flask import url_for, render_template
from flask.ext.babel import gettext
from pgadmin.browser.utils import PgAdminModule, PGChildModule
from pgadmin.utils import PgAdminModule
from pgadmin.browser.utils import PGChildModule
from pgadmin.browser import BrowserPluginModule
from pgadmin.browser.utils import PGChildNodeView
@six.add_metaclass(ABCMeta)
class CollectionNodeModule(PgAdminModule, PGChildModule):
@@ -25,11 +25,14 @@ class CollectionNodeModule(PgAdminModule, PGChildModule):
def __init__(self, import_name, **kwargs):
kwargs.setdefault("url_prefix", self.node_path)
kwargs.setdefault("static_url_path", '/static')
super(CollectionNodeModule, self).__init__(
"NODE-%s" % self.node_type,
import_name,
**kwargs
)
PgAdminModule.__init__(
self,
"NODE-%s" % self.node_type,
import_name,
**kwargs
)
PGChildModule.__init__(self)
@property
def jssnippets(self):