MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / __init__

Method __init__

web/pgadmin/browser/__init__.py:153–183  ·  view source on GitHub ↗

Construct a new 'BrowserPluginModule' object. :param import_name: Name of the module :param **kwargs: Extra parameters passed to the base class pgAdminModule. :return: returns nothing It sets the url_prefix to based on the 'n

(self, import_name, **kwargs)

Source from the content-addressed store, hash-verified

151 SHOW_ON_BROWSER = True
152
153 def __init__(self, import_name, **kwargs):
154 """
155 Construct a new 'BrowserPluginModule' object.
156
157 :param import_name: Name of the module
158 :param **kwargs: Extra parameters passed to the base class
159 pgAdminModule.
160
161 :return: returns nothing
162
163 It sets the url_prefix to based on the 'node_path'. And,
164 static_url_path to relative path to '/static'.
165
166 Every module extended from this will be identified as 'NODE-<type>'.
167
168 Also, create a preference 'show_node_<type>' to fetch whether it
169 can be shown in the browser or not. Also, refer to the
170 browser-preference.
171 """
172 kwargs.setdefault("url_prefix", self.node_path)
173 kwargs.setdefault("static_url_path", '/static')
174
175 self.browser_preference = None
176 self.pref_show_system_objects = None
177 self.pref_show_node = None
178
179 super().__init__(
180 "NODE-%s" % self.node_type,
181 import_name,
182 **kwargs
183 )
184
185 @property
186 def jssnippets(self):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected