Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
plugin_dbui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
w2pext
plugin_dbui
Commits
24cb2446
Commit
24cb2446
authored
9 years ago
by
legac
Browse files
Options
Downloads
Patches
Plain Diff
Add the plugin.dbui variable app_git.
parent
18d749b5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!4
Release 0.6.5
,
!1
1 branching model
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
models/common_settings.py
+11
-10
11 additions, 10 deletions
models/common_settings.py
models/plugin_dbui.py
+25
-24
25 additions, 24 deletions
models/plugin_dbui.py
with
36 additions
and
34 deletions
models/common_settings.py
+
11
−
10
View file @
24cb2446
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
s
"""
Common settings
"""
import
locale
import
plugin_dbui
as
dbui
from
callbacks
import
country_delete
,
country_insert
,
country_update
from
callbacks
import
country_delete
,
country_insert
,
country_update
from
datetime
import
datetime
from
gluon.tools
import
PluginManager
...
...
@@ -15,22 +15,23 @@ from gluon.tools import PluginManager
#
#-------------------------------------------------------------------------------
plugins
=
PluginManager
()
#plugins.dbui.app_css = None # relative path, i.e static/myapp.css or dir or list
#plugins.dbui.app_js = None # relative path static/src/my.js or dir or list
#plugins.dbui.app_libmin = None # relative path static/myapp-min.js or dir or list
plugins
.
dbui
.
app_script
=
'
static/app.js
'
# relative path static/myapp.js
# plugins.dbui.app_css = None # relative path, i.e static/myapp.css or dir or list
# plugins.dbui.app_js = None # relative path static/src/my.js or dir or list
plugins
.
dbui
.
app_git
=
"
https://gitlab.in2p3.fr/legac/%s.git
"
%
request
.
application
# plugins.dbui.app_libmin = None # relative path static/myapp-min.js or dir or list
plugins
.
dbui
.
app_script
=
'
static/app.js
'
# relative path static/myapp.js
plugins
.
dbui
.
app_script_dir
=
'
static/scripts
'
# relative directory static/scripts
#plugins.dbui.dbui_libmin='static/plugin_dbui/dbui-debug.js'
#
plugins.dbui.dbui_libmin='static/plugin_dbui/dbui-debug.js'
#-------------------------------------------------------------------------------
#
# LANGUAGE
#
#-------------------------------------------------------------------------------
T
.
set_current_languages
(
'
en
'
,
'
en-gb
'
,
'
en-us
'
)
# mother tongue
T
.
force
(
'
fr-fr
'
)
# user language
T
.
lazy
=
False
# immediate translation
T
.
set_current_languages
(
'
en
'
,
'
en-gb
'
,
'
en-us
'
)
# mother tongue
T
.
force
(
'
fr-fr
'
)
# user language
T
.
lazy
=
False
# immediate translation
locale
.
setlocale
(
locale
.
LC_ALL
,
"
fr_FR.UTF-8
"
)
...
...
This diff is collapsed.
Click to expand it.
models/plugin_dbui.py
+
25
−
24
View file @
24cb2446
"""
plugin_dbui
Initialize the plugin_dbui
Define persistent storage, main services
Define persistent storage, main services
and methods available on the client side.
"""
import
plugin_dbui
as
dbui
...
...
@@ -12,7 +12,7 @@ from gluon.storage import Storage
from
gluon.tools
import
PluginManager
# NOTE:
# define default configuration parameters for the plugin,
# define default configuration parameters for the plugin,
# the application using it and the persistent storage used to tune the widgets.
# In most of the case configuration parameters are either a relative path
# to a file (static/myapp.css) or to a directory (static/css) except app_script
...
...
@@ -27,17 +27,18 @@ from gluon.tools import PluginManager
lg
=
dbui
.
get_language
()
plugins
=
PluginManager
(
'
dbui
'
,
app_css
=
None
,
# relative path static/myapp.css or dir or list
app_debug
=
None
,
# relative path static/src/my.js or dir or list
app_lg
=
None
,
# relative path or dir or list
app_libmin
=
None
,
# relative path static/myapp-min.js or dir
app_script
=
None
,
# relative path static/myapp.js
app_script_dir
=
None
,
# relative directory static/scripts
app_css
=
None
,
# relative path static/myapp.css or dir or list
app_debug
=
None
,
# relative path static/src/my.js or dir or list
app_git
=
None
,
app_lg
=
None
,
# relative path or dir or list
app_libmin
=
None
,
# relative path static/myapp-min.js or dir
app_script
=
None
,
# relative path static/myapp.js
app_script_dir
=
None
,
# relative directory static/scripts
dbui_conf
=
URL
(
c
=
'
plugin_dbui
'
,
f
=
'
dbui_conf
'
),
dbui_conf_debug
=
URL
(
c
=
'
plugin_dbui
'
,
f
=
'
dbui_conf
'
,
dbui_conf_debug
=
URL
(
c
=
'
plugin_dbui
'
,
f
=
'
dbui_conf
'
,
vars
=
dict
(
debug
=
""
)),
dbui_css
=
[
'
static/plugin_dbui/resources/css/kde-oxygen.css
'
,
'
static/plugin_dbui/resources/css/dbui.css
'
],
...
...
@@ -45,10 +46,10 @@ plugins = PluginManager('dbui',
dbui_lg
=
'
static/plugin_dbui/locale/dbui-lang-%s.js
'
%
lg
,
dbui_libmin
=
'
static/plugin_dbui/dbui-min.js
'
,
dbui_script
=
'
static/plugin_dbui/main.js
'
,
ace_libmin
=
'
static/plugin_ace/src-min-noconflict/ace.js
'
,
ace_css
=
'
static/plugin_ace/css/editor.css
'
,
extjs_css
=
'
static/plugin_extjs/resources/css/ext-all.css
'
,
extjs_debug
=
'
static/plugin_extjs/ext-dev.js
'
,
extjs_libmin
=
'
static/plugin_extjs/ext-all.js
'
,
...
...
@@ -61,9 +62,9 @@ plugins = PluginManager('dbui',
modifier_grids
=
{},
modifier_stores
=
{},
modifier_viewports
=
Storage
(
extjs
=
{}),
static_stores
=
{})
# Start common services
dbSvc
=
dbui
.
DbSvc
()
...
...
@@ -80,29 +81,29 @@ def close_user_session():
return
dbui
.
close_user_session
()
@directSvc.register
def
getForm
(
tablename
):
def
getForm
(
tablename
):
return
dbui
.
to_formPanel
(
db
[
tablename
])
@directSvc.register
def
getGrid
(
tablename
):
def
getGrid
(
tablename
):
return
dbui
.
to_gridPanel
(
db
[
tablename
])
@directSvc.register
def
create
(
data
):
def
create
(
data
):
return
dbSvc
.
create
(
data
)
@directSvc.register
def
count
(
data
):
def
count
(
data
):
return
dbSvc
.
count
(
data
)
@directSvc.register
def
destroy
(
data
):
def
destroy
(
data
):
return
dbSvc
.
destroy
(
data
)
@directSvc.register
def
read
(
data
):
def
read
(
data
):
return
dbSvc
.
read
(
data
)
@directSvc.register
def
update
(
data
):
return
dbSvc
.
update
(
data
)
\ No newline at end of file
def
update
(
data
):
return
dbSvc
.
update
(
data
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment