Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Arnaud Fontaine
erp5
Commits
7398415a
Commit
7398415a
authored
Jun 21, 2011
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added method to return signature as JSON
This could be improved in future as an Accessor or Similar.
parent
7b21969f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
product/ERP5/Tool/IntrospectionTool.py
product/ERP5/Tool/IntrospectionTool.py
+14
-0
No files found.
product/ERP5/Tool/IntrospectionTool.py
View file @
7398415a
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
import
os
import
os
import
sys
import
sys
import
tempfile
import
tempfile
import
json
from
AccessControl
import
ClassSecurityInfo
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type.Globals
import
InitializeClass
,
DTMLFile
from
Products.ERP5Type.Globals
import
InitializeClass
,
DTMLFile
from
Products.CMFCore.utils
import
getToolByName
from
Products.CMFCore.utils
import
getToolByName
...
@@ -446,4 +447,17 @@ class IntrospectionTool(LogMixin, BaseTool):
...
@@ -446,4 +447,17 @@ class IntrospectionTool(LogMixin, BaseTool):
external_connection_dict
=
self
.
_getExternalConnectionDict
(),
external_connection_dict
=
self
.
_getExternalConnectionDict
(),
business_template_dict
=
self
.
_getBusinessTemplateRevisionDict
(),
business_template_dict
=
self
.
_getBusinessTemplateRevisionDict
(),
business_template_repository_list
=
business_template_repository_list
)
business_template_repository_list
=
business_template_repository_list
)
security
.
declareProtected
(
Permissions
.
ManagePortal
,
'getSystemSignatureAsJSON'
)
def
getSystemSignatureAsJSON
(
self
,
REQUEST
=
None
):
"""
Returns the information as JSON.
THIS merhod could be a decorator or use a some other clever way to convert
the getSystemSignatureDict
"""
if
REQUEST
is
not
None
:
REQUEST
.
set
(
"Content-Type"
,
"application/json"
)
return
json
.
dumps
(
self
.
getSystemSignatureDict
())
InitializeClass
(
IntrospectionTool
)
InitializeClass
(
IntrospectionTool
)
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