Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
w2pext
plugin_dbui
Commits
43e5a68e
Commit
43e5a68e
authored
Nov 24, 2016
by
LE GAC Renaud
Browse files
Update Dbui to refactorize the method initialise in intialise_paths and initialise_ui.
parent
b561d0ce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
15 deletions
+31
-15
models/common_settings.py
models/common_settings.py
+10
-6
modules/plugin_dbui/dbui.py
modules/plugin_dbui/dbui.py
+21
-9
No files found.
models/common_settings.py
View file @
43e5a68e
...
...
@@ -9,7 +9,7 @@ from datetime import datetime
#.............................................................................
#
# L
ANGUAGE
# L
anguage
#
T
.
set_current_languages
(
"en"
,
"en-gb"
,
"en-us"
)
# mother tongue
...
...
@@ -18,10 +18,12 @@ T.lazy = False # immediate translation
#.............................................................................
#
#
PLUGIN DBUI
#
Configure plugin_dbui
#
dbui
.
Dbui
.
initialise
(
plg_dbui
=
dbui
.
Dbui
plg_dbui
.
initialise_paths
(
# app_css=None,
# app_js=None,
app_git
=
"https://gitlab.in2p3.fr/w2pext/plugin_dbui.git"
,
...
...
@@ -31,11 +33,13 @@ dbui.Dbui.initialise(
# dbui_libmin="static/plugin_dbui/dbui-debug.js"
)
directSvc
=
dbui
.
Dbui
.
start_directSvc
()
plg_dbui
.
initialise_ui
()
directSvc
=
plg_dbui
.
start_directSvc
()
#.............................................................................
#
# C
ONSTANTS
# C
onstants
#
undef
=
T
(
dbui
.
UNDEF
)
...
...
@@ -44,7 +48,7 @@ year = datetime.now().year
#.............................................................................
#
# C
OMMON CONFIGURATION FOR FORMS AND GRIDS
# C
ommon configuration for forms and grids
#
tables
=
[
"categories"
,
...
...
modules/plugin_dbui/dbui.py
View file @
43e5a68e
...
...
@@ -63,7 +63,7 @@ class Dbui(object):
"""
@
staticmethod
def
initialise
(
**
kwargs
):
def
initialise
_paths
(
**
kwargs
):
"""Initialise the configuration of the the plugin dbui, namely paths
and a persistent storage.
...
...
@@ -192,15 +192,27 @@ class Dbui(object):
plugin
.
dbui_conf
=
plugin
.
dbui_conf
%
application
plugin
.
dbui_conf_debug
=
plugin
.
dbui_conf_debug
%
application
# persistent storage for the UI (private)
plugin
.
modifier_fields
=
{}
plugin
.
modifier_forms
=
{}
plugin
.
modifier_grids
=
{}
plugin
.
modifier_stores
=
{}
plugin
.
modifier_viewports
=
Storage
(
extjs
=
{})
plugin
.
static_stores
=
{}
@
staticmethod
def
initialise_ui
():
"""Initialise persistent storage for the plugin dbui.
return
plugin
Attributes:
modifier_fields (dict):
modifier_forms (dict):
modifier_grids (dict):
modifier_stores (dict):
modifier_viewports (gluon.storage.Storage):
static_stores (dict):
"""
plugin
=
PluginManager
(
"dbui"
).
dbui
plugin
.
modifier_fields
=
{}
plugin
.
modifier_forms
=
{}
plugin
.
modifier_grids
=
{}
plugin
.
modifier_stores
=
{}
plugin
.
modifier_viewports
=
Storage
(
extjs
=
{})
plugin
.
static_stores
=
{}
@
staticmethod
def
start_directSvc
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment