Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alexander Emmerich
erp5
Commits
0df4c670
Commit
0df4c670
authored
Feb 09, 2021
by
Aurel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apply absolute import fixer
parent
f8c0337a
Changes
149
Hide whitespace changes
Inline
Side-by-side
Showing
149 changed files
with
472 additions
and
315 deletions
+472
-315
product/CMFActivity/ActiveObject.py
product/CMFActivity/ActiveObject.py
+2
-1
product/CMFActivity/Activity/SQLBase.py
product/CMFActivity/Activity/SQLBase.py
+2
-1
product/CMFActivity/Activity/SQLDict.py
product/CMFActivity/Activity/SQLDict.py
+2
-1
product/CMFActivity/Activity/SQLJoblib.py
product/CMFActivity/Activity/SQLJoblib.py
+3
-2
product/CMFActivity/Activity/SQLQueue.py
product/CMFActivity/Activity/SQLQueue.py
+2
-1
product/CMFActivity/ActivityTool.py
product/CMFActivity/ActivityTool.py
+4
-3
product/CMFActivity/__init__.py
product/CMFActivity/__init__.py
+4
-2
product/CMFCategory/__init__.py
product/CMFCategory/__init__.py
+5
-3
product/DeadlockDebugger/__init__.py
product/DeadlockDebugger/__init__.py
+2
-1
product/ERP5/DeliverySolver/Copy.py
product/ERP5/DeliverySolver/Copy.py
+2
-1
product/ERP5/DeliverySolver/Distribute.py
product/ERP5/DeliverySolver/Distribute.py
+2
-1
product/ERP5/ERP5Site.py
product/ERP5/ERP5Site.py
+2
-1
product/ERP5/InteractionWorkflow.py
product/ERP5/InteractionWorkflow.py
+2
-1
product/ERP5/TargetSolver/Copy.py
product/ERP5/TargetSolver/Copy.py
+2
-1
product/ERP5/TargetSolver/CopyAndPropagate.py
product/ERP5/TargetSolver/CopyAndPropagate.py
+2
-1
product/ERP5/TargetSolver/CopyToTarget.py
product/ERP5/TargetSolver/CopyToTarget.py
+2
-1
product/ERP5/TargetSolver/ProfitAndLoss.py
product/ERP5/TargetSolver/ProfitAndLoss.py
+2
-1
product/ERP5/TargetSolver/Reduce.py
product/ERP5/TargetSolver/Reduce.py
+2
-1
product/ERP5/TargetSolver/ResourceBackpropagation.py
product/ERP5/TargetSolver/ResourceBackpropagation.py
+2
-1
product/ERP5/TargetSolver/SplitAndDefer.py
product/ERP5/TargetSolver/SplitAndDefer.py
+2
-1
product/ERP5/TargetSolver/SplitQuantity.py
product/ERP5/TargetSolver/SplitQuantity.py
+2
-1
product/ERP5/TargetSolver/TransformationSourcingCopyToTarget.py
...t/ERP5/TargetSolver/TransformationSourcingCopyToTarget.py
+2
-1
product/ERP5/__init__.py
product/ERP5/__init__.py
+7
-5
product/ERP5/ancient/Core/Container.py
product/ERP5/ancient/Core/Container.py
+2
-1
product/ERP5/ancient/Core/__init__.py
product/ERP5/ancient/Core/__init__.py
+5
-4
product/ERP5Catalog/__init__.py
product/ERP5Catalog/__init__.py
+5
-3
product/ERP5Form/CaptchaField.py
product/ERP5Form/CaptchaField.py
+2
-1
product/ERP5Form/ListBox.py
product/ERP5Form/ListBox.py
+3
-2
product/ERP5Form/OOoChart.py
product/ERP5Form/OOoChart.py
+2
-1
product/ERP5Form/PlanningBox.py
product/ERP5Form/PlanningBox.py
+3
-2
product/ERP5Form/Report.py
product/ERP5Form/Report.py
+4
-3
product/ERP5Form/ZGDChart.py
product/ERP5Form/ZGDChart.py
+2
-1
product/ERP5Form/ZPyChart.py
product/ERP5Form/ZPyChart.py
+2
-1
product/ERP5Form/__init__.py
product/ERP5Form/__init__.py
+17
-15
product/ERP5OOo/OOoTemplate.py
product/ERP5OOo/OOoTemplate.py
+2
-1
product/ERP5OOo/__init__.py
product/ERP5OOo/__init__.py
+6
-4
product/ERP5OOo/tests/testIngestionWithFlare.py
product/ERP5OOo/tests/testIngestionWithFlare.py
+2
-1
product/ERP5OOo/tests/testOOoStyleWithFlare.py
product/ERP5OOo/tests/testOOoStyleWithFlare.py
+2
-1
product/ERP5OOo/transforms/html_to_odt.py
product/ERP5OOo/transforms/html_to_odt.py
+3
-2
product/ERP5OOo/transforms/odt_to_doc.py
product/ERP5OOo/transforms/odt_to_doc.py
+2
-1
product/ERP5OOo/transforms/odt_to_pdf.py
product/ERP5OOo/transforms/odt_to_pdf.py
+2
-1
product/ERP5OOo/transforms/odt_to_xml.py
product/ERP5OOo/transforms/odt_to_xml.py
+2
-1
product/ERP5Security/__init__.py
product/ERP5Security/__init__.py
+12
-11
product/ERP5Type/Accessor/Accessor.py
product/ERP5Type/Accessor/Accessor.py
+3
-2
product/ERP5Type/Accessor/Acquired.py
product/ERP5Type/Accessor/Acquired.py
+2
-1
product/ERP5Type/Accessor/AcquiredProperty.py
product/ERP5Type/Accessor/AcquiredProperty.py
+2
-1
product/ERP5Type/Accessor/Alias.py
product/ERP5Type/Accessor/Alias.py
+2
-1
product/ERP5Type/Accessor/Base.py
product/ERP5Type/Accessor/Base.py
+3
-2
product/ERP5Type/Accessor/Category.py
product/ERP5Type/Accessor/Category.py
+2
-1
product/ERP5Type/Accessor/Constant.py
product/ERP5Type/Accessor/Constant.py
+2
-1
product/ERP5Type/Accessor/Content.py
product/ERP5Type/Accessor/Content.py
+3
-2
product/ERP5Type/Accessor/ContentProperty.py
product/ERP5Type/Accessor/ContentProperty.py
+3
-2
product/ERP5Type/Accessor/List.py
product/ERP5Type/Accessor/List.py
+4
-3
product/ERP5Type/Accessor/Related.py
product/ERP5Type/Accessor/Related.py
+2
-1
product/ERP5Type/Accessor/RelatedValue.py
product/ERP5Type/Accessor/RelatedValue.py
+2
-1
product/ERP5Type/Accessor/Value.py
product/ERP5Type/Accessor/Value.py
+2
-1
product/ERP5Type/Accessor/WorkflowHistory.py
product/ERP5Type/Accessor/WorkflowHistory.py
+2
-1
product/ERP5Type/Accessor/WorkflowState.py
product/ERP5Type/Accessor/WorkflowState.py
+2
-1
product/ERP5Type/Base.py
product/ERP5Type/Base.py
+4
-3
product/ERP5Type/Cache.py
product/ERP5Type/Cache.py
+2
-1
product/ERP5Type/CachePlugins/DistributedRamCache.py
product/ERP5Type/CachePlugins/DistributedRamCache.py
+3
-2
product/ERP5Type/CachePlugins/DummyCache.py
product/ERP5Type/CachePlugins/DummyCache.py
+2
-1
product/ERP5Type/CachePlugins/RamCache.py
product/ERP5Type/CachePlugins/RamCache.py
+2
-1
product/ERP5Type/Constraint/AttributeBlacklisted.py
product/ERP5Type/Constraint/AttributeBlacklisted.py
+2
-1
product/ERP5Type/Constraint/AttributeEquality.py
product/ERP5Type/Constraint/AttributeEquality.py
+2
-1
product/ERP5Type/Constraint/AttributeUnicity.py
product/ERP5Type/Constraint/AttributeUnicity.py
+2
-1
product/ERP5Type/Constraint/CategoryAcquiredMembershipArity.py
...ct/ERP5Type/Constraint/CategoryAcquiredMembershipArity.py
+2
-1
product/ERP5Type/Constraint/CategoryExistence.py
product/ERP5Type/Constraint/CategoryExistence.py
+2
-1
product/ERP5Type/Constraint/CategoryMembershipArity.py
product/ERP5Type/Constraint/CategoryMembershipArity.py
+2
-1
product/ERP5Type/Constraint/CategoryRelatedMembershipArity.py
...uct/ERP5Type/Constraint/CategoryRelatedMembershipArity.py
+2
-1
product/ERP5Type/Constraint/PortalTypeClass.py
product/ERP5Type/Constraint/PortalTypeClass.py
+2
-1
product/ERP5Type/Constraint/PropertyExistence.py
product/ERP5Type/Constraint/PropertyExistence.py
+2
-1
product/ERP5Type/Constraint/PropertyTypeValidity.py
product/ERP5Type/Constraint/PropertyTypeValidity.py
+2
-1
product/ERP5Type/Constraint/TALESConstraint.py
product/ERP5Type/Constraint/TALESConstraint.py
+2
-1
product/ERP5Type/Constraint/__init__.py
product/ERP5Type/Constraint/__init__.py
+19
-18
product/ERP5Type/ERP5Type.py
product/ERP5Type/ERP5Type.py
+2
-1
product/ERP5Type/InitGenerator.py
product/ERP5Type/InitGenerator.py
+3
-2
product/ERP5Type/TranslationProviderBase.py
product/ERP5Type/TranslationProviderBase.py
+2
-1
product/ERP5Type/Utils.py
product/ERP5Type/Utils.py
+5
-4
product/ERP5Type/XMLObject.py
product/ERP5Type/XMLObject.py
+2
-1
product/ERP5Type/__init__.py
product/ERP5Type/__init__.py
+13
-11
product/ERP5Type/dynamic/dynamic_module.py
product/ERP5Type/dynamic/dynamic_module.py
+5
-4
product/ERP5Type/dynamic/lazy_class.py
product/ERP5Type/dynamic/lazy_class.py
+4
-3
product/ERP5Type/interfaces/__init__.py
product/ERP5Type/interfaces/__init__.py
+10
-9
product/ERP5Type/tests/runTestSuite.py
product/ERP5Type/tests/runTestSuite.py
+2
-1
product/ERP5Workflow/__init__.py
product/ERP5Workflow/__init__.py
+3
-2
product/Formulator/DummyField.py
product/Formulator/DummyField.py
+2
-1
product/Formulator/Field.py
product/Formulator/Field.py
+3
-2
product/Formulator/FieldRegistry.py
product/Formulator/FieldRegistry.py
+4
-3
product/Formulator/Form.py
product/Formulator/Form.py
+7
-6
product/Formulator/HelperFields.py
product/Formulator/HelperFields.py
+4
-3
product/Formulator/ListTextAreaField.py
product/Formulator/ListTextAreaField.py
+4
-3
product/Formulator/MethodField.py
product/Formulator/MethodField.py
+4
-3
product/Formulator/ProductForm.py
product/Formulator/ProductForm.py
+2
-1
product/Formulator/StandardFields.py
product/Formulator/StandardFields.py
+6
-5
product/Formulator/TALESField.py
product/Formulator/TALESField.py
+4
-3
product/Formulator/Validator.py
product/Formulator/Validator.py
+4
-3
product/Formulator/Widget.py
product/Formulator/Widget.py
+2
-1
product/Formulator/XMLToForm.py
product/Formulator/XMLToForm.py
+3
-1
product/Formulator/__init__.py
product/Formulator/__init__.py
+6
-5
product/HBTreeFolder2/__init__.py
product/HBTreeFolder2/__init__.py
+3
-2
product/Localizer/LanguageManager.py
product/Localizer/LanguageManager.py
+3
-2
product/Localizer/LocalFiles.py
product/Localizer/LocalFiles.py
+2
-1
product/Localizer/Localizer.py
product/Localizer/Localizer.py
+7
-6
product/Localizer/MessageCatalog.py
product/Localizer/MessageCatalog.py
+5
-4
product/Localizer/__init__.py
product/Localizer/__init__.py
+5
-4
product/Localizer/itools/i18n/__init__.py
product/Localizer/itools/i18n/__init__.py
+7
-6
product/Localizer/itools/i18n/locale_.py
product/Localizer/itools/i18n/locale_.py
+2
-1
product/Localizer/utils.py
product/Localizer/utils.py
+2
-1
product/MailTemplates/BaseMailTemplate.py
product/MailTemplates/BaseMailTemplate.py
+2
-1
product/MailTemplates/FSMailTemplate.py
product/MailTemplates/FSMailTemplate.py
+3
-2
product/MailTemplates/MailTemplate.py
product/MailTemplates/MailTemplate.py
+2
-1
product/MailTemplates/__init__.py
product/MailTemplates/__init__.py
+3
-2
product/MailTemplates/tests/test_FSMailTemplate.py
product/MailTemplates/tests/test_FSMailTemplate.py
+2
-1
product/PortalTransforms/tests/test_graph.py
product/PortalTransforms/tests/test_graph.py
+2
-1
product/PortalTransforms/tests/test_transforms.py
product/PortalTransforms/tests/test_transforms.py
+2
-1
product/PortalTransforms/transforms/office_uno.py
product/PortalTransforms/transforms/office_uno.py
+2
-1
product/PortalTransforms/transforms/word_to_html.py
product/PortalTransforms/transforms/word_to_html.py
+5
-4
product/ZLDAPConnection/ZLDAP.py
product/ZLDAPConnection/ZLDAP.py
+3
-2
product/ZLDAPConnection/__init__.py
product/ZLDAPConnection/__init__.py
+2
-1
product/ZLDAPMethods/LM.py
product/ZLDAPMethods/LM.py
+2
-1
product/ZLDAPMethods/__init__.py
product/ZLDAPMethods/__init__.py
+2
-1
product/ZSQLCatalog/ColumnMap.py
product/ZSQLCatalog/ColumnMap.py
+2
-1
product/ZSQLCatalog/Operator/ComparisonOperator.py
product/ZSQLCatalog/Operator/ComparisonOperator.py
+2
-1
product/ZSQLCatalog/Operator/__init__.py
product/ZSQLCatalog/Operator/__init__.py
+2
-1
product/ZSQLCatalog/Query/AutoQuery.py
product/ZSQLCatalog/Query/AutoQuery.py
+2
-1
product/ZSQLCatalog/Query/ComplexQuery.py
product/ZSQLCatalog/Query/ComplexQuery.py
+2
-1
product/ZSQLCatalog/Query/RelatedQuery.py
product/ZSQLCatalog/Query/RelatedQuery.py
+2
-1
product/ZSQLCatalog/Query/SQLQuery.py
product/ZSQLCatalog/Query/SQLQuery.py
+2
-1
product/ZSQLCatalog/Query/SimpleQuery.py
product/ZSQLCatalog/Query/SimpleQuery.py
+2
-1
product/ZSQLCatalog/SQLCatalog.py
product/ZSQLCatalog/SQLCatalog.py
+10
-9
product/ZSQLCatalog/SQLExpression.py
product/ZSQLCatalog/SQLExpression.py
+2
-1
product/ZSQLCatalog/SearchKey/DateTimeKey.py
product/ZSQLCatalog/SearchKey/DateTimeKey.py
+2
-1
product/ZSQLCatalog/SearchKey/DefaultKey.py
product/ZSQLCatalog/SearchKey/DefaultKey.py
+2
-1
product/ZSQLCatalog/SearchKey/FullTextKey.py
product/ZSQLCatalog/SearchKey/FullTextKey.py
+2
-1
product/ZSQLCatalog/SearchKey/KeywordKey.py
product/ZSQLCatalog/SearchKey/KeywordKey.py
+2
-1
product/ZSQLCatalog/SearchKey/MroongaBooleanFullTextKey.py
product/ZSQLCatalog/SearchKey/MroongaBooleanFullTextKey.py
+2
-1
product/ZSQLCatalog/SearchKey/MroongaFullTextKey.py
product/ZSQLCatalog/SearchKey/MroongaFullTextKey.py
+2
-1
product/ZSQLCatalog/SearchKey/RawKey.py
product/ZSQLCatalog/SearchKey/RawKey.py
+2
-1
product/ZSQLCatalog/SearchKey/RelatedKey.py
product/ZSQLCatalog/SearchKey/RelatedKey.py
+2
-1
product/ZSQLCatalog/SearchKey/SphinxSEFullTextKey.py
product/ZSQLCatalog/SearchKey/SphinxSEFullTextKey.py
+2
-1
product/ZSQLCatalog/SearchText/AdvancedSearchTextDetector.py
product/ZSQLCatalog/SearchText/AdvancedSearchTextDetector.py
+2
-1
product/ZSQLCatalog/SearchText/AdvancedSearchTextParser.py
product/ZSQLCatalog/SearchText/AdvancedSearchTextParser.py
+2
-1
product/ZSQLCatalog/SearchText/SearchTextParser.py
product/ZSQLCatalog/SearchText/SearchTextParser.py
+4
-3
product/ZSQLCatalog/SearchText/__init__.py
product/ZSQLCatalog/SearchText/__init__.py
+2
-1
product/ZSQLCatalog/ZSQLCatalog.py
product/ZSQLCatalog/ZSQLCatalog.py
+2
-1
product/ZSQLCatalog/__init__.py
product/ZSQLCatalog/__init__.py
+4
-3
product/Zelenium/__init__.py
product/Zelenium/__init__.py
+3
-2
product/Zelenium/zuite.py
product/Zelenium/zuite.py
+4
-3
No files found.
product/CMFActivity/ActiveObject.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -33,7 +34,7 @@ from AccessControl import ClassSecurityInfo
from
Acquisition
import
aq_base
from
Products.ERP5Type.Globals
import
InitializeClass
from
Products.ERP5Type.TransactionalVariable
import
getTransactionalVariable
from
ActivityRuntimeEnvironment
import
getActivityRuntimeEnvironment
from
.
ActivityRuntimeEnvironment
import
getActivityRuntimeEnvironment
from
AccessControl
import
Unauthorized
from
Products.CMFCore
import
permissions
...
...
product/CMFActivity/Activity/SQLBase.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2007 Nexedi SA and Contributors. All Rights Reserved.
...
...
@@ -42,7 +43,7 @@ from Products.CMFActivity.ActivityTool import (
Message
,
MESSAGE_NOT_EXECUTED
,
MESSAGE_EXECUTED
,
SkippedMessage
)
from
Products.CMFActivity.ActivityRuntimeEnvironment
import
(
DEFAULT_MAX_RETRY
,
ActivityRuntimeEnvironment
)
from
Queue
import
Queue
,
VALIDATION_ERROR_DELAY
from
.
Queue
import
Queue
,
VALIDATION_ERROR_DELAY
from
Products.CMFActivity.Errors
import
ActivityFlushError
from
Products.ERP5Type
import
Timeout
from
Products.ERP5Type.Timeout
import
TimeoutReachedError
,
Deadline
...
...
product/CMFActivity/Activity/SQLDict.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002,2007 Nexedi SA and Contributors. All Rights Reserved.
...
...
@@ -30,7 +31,7 @@ from Shared.DC.ZRDB.Results import Results
from
Products.CMFActivity.ActivityTool
import
Message
import
sys
#from time import time
from
SQLBase
import
SQLBase
,
sort_message_key
from
.
SQLBase
import
SQLBase
,
sort_message_key
import
transaction
...
...
product/CMFActivity/Activity/SQLJoblib.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002,2007 Nexedi SA and Contributors. All Rights Reserved.
...
...
@@ -30,12 +31,12 @@ from random import getrandbits
from
zLOG
import
LOG
,
TRACE
,
INFO
,
WARNING
,
ERROR
,
PANIC
import
MySQLdb
from
MySQLdb.constants.ER
import
DUP_ENTRY
from
SQLBase
import
(
from
.
SQLBase
import
(
SQLBase
,
sort_message_key
,
UID_SAFE_BITSIZE
,
UID_ALLOCATION_TRY_COUNT
,
)
from
Products.CMFActivity.ActivityTool
import
Message
from
SQLDict
import
SQLDict
from
.
SQLDict
import
SQLDict
class
SQLJoblib
(
SQLDict
):
"""
...
...
product/CMFActivity/Activity/SQLQueue.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002,2007 Nexedi SA and Contributors. All Rights Reserved.
...
...
@@ -26,7 +27,7 @@
#
##############################################################################
from
SQLBase
import
SQLBase
from
.
SQLBase
import
SQLBase
class
SQLQueue
(
SQLBase
):
"""
...
...
product/CMFActivity/ActivityTool.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -47,8 +48,8 @@ from AccessControl.User import system as system_user
from
Products.CMFCore.utils
import
UniqueObject
from
Products.ERP5Type.Globals
import
InitializeClass
,
DTMLFile
from
Acquisition
import
aq_base
,
aq_inner
,
aq_parent
from
ActivityBuffer
import
ActivityBuffer
from
ActivityRuntimeEnvironment
import
BaseMessage
from
.
ActivityBuffer
import
ActivityBuffer
from
.
ActivityRuntimeEnvironment
import
BaseMessage
from
zExceptions
import
ExceptionFormatter
,
Redirect
from
BTrees.OIBTree
import
OIBTree
from
BTrees.OOBTree
import
OOBTree
...
...
@@ -502,7 +503,7 @@ allow_class(GroupedMessage)
# Activity Registration
def
activity_dict
():
from
Activity
import
SQLDict
,
SQLQueue
,
SQLJoblib
from
.
Activity
import
SQLDict
,
SQLQueue
,
SQLJoblib
return
{
k
:
getattr
(
v
,
k
)()
for
k
,
v
in
locals
().
iteritems
()}
activity_dict
=
activity_dict
()
...
...
product/CMFActivity/__init__.py
View file @
0df4c670
...
...
@@ -29,10 +29,12 @@
ERP5Catalog provides an extended catalog based on ZSQLCatalog
and extended local roles management
"""
from
__future__
import
absolute_import
# Update ERP5 Globals
from
Products.ERP5Type.Utils
import
initializeProduct
,
updateGlobals
import
sys
,
Permissions
import
sys
from
.
import
Permissions
this_module
=
sys
.
modules
[
__name__
]
document_classes
=
updateGlobals
(
this_module
,
globals
(),
permissions_module
=
Permissions
)
...
...
@@ -40,7 +42,7 @@ document_classes = updateGlobals(this_module, globals(),
# Finish installation
def
initialize
(
context
):
# Define object classes and tools
import
ActivityTool
,
ActiveProcess
,
ActivityConnection
from
.
import
ActivityTool
,
ActiveProcess
,
ActivityConnection
from
.joblib
import
CMFActivityParallelBackend
object_classes
=
(
ActiveProcess
.
ActiveProcess
,
#ActivityConnection.ActivityConnection
...
...
product/CMFCategory/__init__.py
View file @
0df4c670
...
...
@@ -29,15 +29,17 @@
CMFCategory provides a way to implement categories and relations
in the CMF. It is based on the ERP5Type RAD
"""
from
__future__
import
absolute_import
# Update ERP5 Globals
from
Products.ERP5Type.Utils
import
initializeProduct
,
updateGlobals
import
sys
,
Permissions
import
sys
from
.
import
Permissions
this_module
=
sys
.
modules
[
__name__
]
document_classes
=
updateGlobals
(
this_module
,
globals
(),
permissions_module
=
Permissions
)
# Define object classes and tools
import
Category
,
CategoryTool
from
.
import
Category
,
CategoryTool
object_classes
=
()
portal_tools
=
(
CategoryTool
.
CategoryTool
,
)
content_classes
=
()
...
...
@@ -45,7 +47,7 @@ content_constructors = ()
# Finish installation
def
initialize
(
context
):
import
Document
from
.
import
Document
initializeProduct
(
context
,
this_module
,
globals
(),
document_module
=
Document
,
document_classes
=
document_classes
,
...
...
product/DeadlockDebugger/__init__.py
View file @
0df4c670
...
...
@@ -24,6 +24,7 @@ with tracebacks of the running python threads will be made.
You MUST configure zope.conf before use.
"""
from
__future__
import
absolute_import
from
zLOG
import
LOG
,
INFO
,
ERROR
from
App.config
import
getConfiguration
...
...
@@ -42,5 +43,5 @@ if getattr(config, 'product_config', None) is not None:
'optionally secret in <product-config deadlockdebugger>, not '
'activated'
)
else
:
import
dumper
from
.
import
dumper
LOG
(
'DeadlockDebugger'
,
INFO
,
"Installed"
)
product/ERP5/DeliverySolver/Copy.py
View file @
0df4c670
...
...
@@ -28,7 +28,8 @@
##############################################################################
from
DeliverySolver
import
DeliverySolver
from
__future__
import
absolute_import
from
.DeliverySolver
import
DeliverySolver
class
Copy
(
DeliverySolver
):
"""
...
...
product/ERP5/DeliverySolver/Distribute.py
View file @
0df4c670
...
...
@@ -28,7 +28,8 @@
##############################################################################
from
DeliverySolver
import
DeliverySolver
from
__future__
import
absolute_import
from
.DeliverySolver
import
DeliverySolver
class
Distribute
(
DeliverySolver
):
"""
...
...
product/ERP5/ERP5Site.py
View file @
0df4c670
...
...
@@ -14,6 +14,7 @@
"""
Portal class
"""
from
__future__
import
absolute_import
from
DateTime
import
DateTime
from
six.moves
import
map
...
...
@@ -37,7 +38,7 @@ from Products.ERP5Type.Cache import CachingMethod, CacheCookieMixin
from
Products.ERP5Type.ERP5Type
import
ERP5TypeInformation
from
Products.ERP5Type.patches.CMFCoreSkinnable
import
SKINDATA
,
skinResolve
from
Products.CMFActivity.Errors
import
ActivityPendingError
import
ERP5Defaults
from
.
import
ERP5Defaults
from
Products.ERP5Type.TransactionalVariable
import
\
getTransactionalVariable
,
TransactionalResource
from
Products.ERP5Type.dynamic.portal_type_class
import
synchronizeDynamicModules
...
...
product/ERP5/InteractionWorkflow.py
View file @
0df4c670
...
...
@@ -17,6 +17,7 @@
#
##############################################################################
from
__future__
import
absolute_import
import
transaction
from
Products.ERP5Type
import
Globals
import
App
...
...
@@ -106,7 +107,7 @@ class InteractionWorkflowDefinition (DCWorkflowDefinition, ActiveObject):
def
__init__
(
self
,
id
):
self
.
id
=
id
from
Interaction
import
Interaction
from
.
Interaction
import
Interaction
self
.
_addObject
(
Interaction
(
'interactions'
))
from
Products.DCWorkflow.Variables
import
Variables
self
.
_addObject
(
Variables
(
'variables'
))
...
...
product/ERP5/TargetSolver/Copy.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2008,2010 Nexedi SA and Contributors. All Rights Reserved.
...
...
@@ -24,7 +25,7 @@
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
##############################################################################
from
TargetSolver
import
TargetSolver
from
.
TargetSolver
import
TargetSolver
class
Copy
(
TargetSolver
):
"""
...
...
product/ERP5/TargetSolver/CopyAndPropagate.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2008 Nexedi SA and Contributors. All Rights Reserved.
...
...
@@ -24,7 +25,7 @@
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
##############################################################################
from
TargetSolver
import
TargetSolver
from
.
TargetSolver
import
TargetSolver
class
CopyAndPropagate
(
TargetSolver
):
"""
...
...
product/ERP5/TargetSolver/CopyToTarget.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002, 2005 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -27,7 +28,7 @@
#
##############################################################################
from
TargetSolver
import
TargetSolver
from
.
TargetSolver
import
TargetSolver
class
CopyToTarget
(
TargetSolver
):
"""
...
...
product/ERP5/TargetSolver/ProfitAndLoss.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2008 Nexedi SA and Contributors. All Rights Reserved.
...
...
@@ -27,7 +28,7 @@
##############################################################################
from
CopyToTarget
import
CopyToTarget
from
.
CopyToTarget
import
CopyToTarget
class
ProfitAndLoss
(
CopyToTarget
):
"""
...
...
product/ERP5/TargetSolver/Reduce.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -26,7 +27,7 @@
#
##############################################################################
from
TargetSolver
import
TargetSolver
from
.
TargetSolver
import
TargetSolver
class
Reduce
(
TargetSolver
):
"""
...
...
product/ERP5/TargetSolver/ResourceBackpropagation.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002, 2005 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -27,7 +28,7 @@
#
##############################################################################
from
CopyToTarget
import
CopyToTarget
from
.
CopyToTarget
import
CopyToTarget
class
ResourceBackpropagation
(
CopyToTarget
):
"""
...
...
product/ERP5/TargetSolver/SplitAndDefer.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002, 2005 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -28,7 +29,7 @@
##############################################################################
from
Products.ERP5Type.Globals
import
PersistentMapping
from
CopyToTarget
import
CopyToTarget
from
.
CopyToTarget
import
CopyToTarget
from
Acquisition
import
aq_base
class
SplitAndDefer
(
CopyToTarget
):
...
...
product/ERP5/TargetSolver/SplitQuantity.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002, 2005 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -27,7 +28,7 @@
#
##############################################################################
from
CopyToTarget
import
CopyToTarget
from
.
CopyToTarget
import
CopyToTarget
from
zLOG
import
LOG
class
SplitQuantity
(
CopyToTarget
):
...
...
product/ERP5/TargetSolver/TransformationSourcingCopyToTarget.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -26,7 +27,7 @@
#
##############################################################################
from
CopyToTarget
import
CopyToTarget
from
.
CopyToTarget
import
CopyToTarget
class
TransformationSourcingCopyToTarget
(
CopyToTarget
):
"""
...
...
product/ERP5/__init__.py
View file @
0df4c670
...
...
@@ -29,10 +29,12 @@
"""
ERP5 Free Software ERP
"""
from
__future__
import
absolute_import
# Update ERP5 Globals
from
Products.ERP5Type.Utils
import
initializeProduct
,
updateGlobals
import
sys
,
Permissions
import
sys
from
.
import
Permissions
this_module
=
sys
.
modules
[
__name__
]
document_classes
=
updateGlobals
(
this_module
,
globals
(),
permissions_module
=
Permissions
)
from
AccessControl
import
ModuleSecurityInfo
...
...
@@ -41,12 +43,12 @@ from Products.ERP5Type.Globals import package_home
product_path
=
package_home
(
globals
()
)
# Define object classes and tools
from
Tool
import
CategoryTool
,
IdTool
,
TemplateTool
,
\
from
.
Tool
import
CategoryTool
,
IdTool
,
TemplateTool
,
\
AlarmTool
,
\
TrashTool
,
\
SolverTool
import
ERP5Site
from
Document
import
PythonScript
,
SQLMethod
from
.
import
ERP5Site
from
.
Document
import
PythonScript
,
SQLMethod
object_classes
=
(
ERP5Site
.
ERP5Site
,
PythonScript
.
PythonScriptThroughZMI
,
SQLMethod
.
SQLMethod
,
...
...
@@ -63,7 +65,7 @@ content_constructors = ()
# Finish installation
def
initialize
(
context
):
import
Document
from
.
import
Document
# Initialize
initializeProduct
(
context
,
this_module
,
globals
(),
document_module
=
Document
,
...
...
product/ERP5/ancient/Core/Container.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -26,7 +27,7 @@
#
##############################################################################
from
Item
import
Item
from
.
Item
import
Item
class
Container
(
Item
):
"""
...
...
product/ERP5/ancient/Core/__init__.py
View file @
0df4c670
from
Variation
import
Variation
from
Resource
import
Resource
from
MetaResource
import
MetaResource
from
MetaNode
import
MetaNode
from
__future__
import
absolute_import
from
.Variation
import
Variation
from
.Resource
import
Resource
from
.MetaResource
import
MetaResource
from
.MetaNode
import
MetaNode
product/ERP5Catalog/__init__.py
View file @
0df4c670
...
...
@@ -29,17 +29,19 @@
ERP5Catalog provides an extended catalog based on ZSQLCatalog
and extended local roles management
"""
from
__future__
import
absolute_import
# Update ERP5 Globals
from
Products.ERP5Type.Utils
import
initializeProduct
,
updateGlobals
import
sys
,
Permissions
import
sys
from
.
import
Permissions
this_module
=
sys
.
modules
[
__name__
]
document_classes
=
updateGlobals
(
this_module
,
globals
(),
permissions_module
=
Permissions
)
# Define object classes and tools
from
Tool
import
ERP5CatalogTool
from
.
Tool
import
ERP5CatalogTool
import
CatalogTool
from
.
import
CatalogTool
object_classes
=
()
portal_tools
=
(
CatalogTool
.
CatalogTool
,
ERP5CatalogTool
.
ERP5CatalogTool
)
...
...
product/ERP5Form/CaptchaField.py
View file @
0df4c670
...
...
@@ -27,6 +27,7 @@
#
##############################################################################
from
__future__
import
absolute_import
from
Products.Formulator
import
Widget
,
Validator
from
Products.Formulator.Field
import
ZMIField
from
Products.Formulator.DummyField
import
fields
...
...
@@ -35,7 +36,7 @@ from Products.PageTemplates.PageTemplateFile import PageTemplateFile
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type.Globals
import
DTMLFile
from
Products.Formulator.TALESField
import
TALESField
import
CaptchasDotNet
from
.
import
CaptchasDotNet
import
string
import
random
from
hashlib
import
md5
...
...
product/ERP5Form/ListBox.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002,2006 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -33,8 +34,8 @@ from Products.Formulator.DummyField import fields
from
Products.Formulator
import
Widget
,
Validator
from
Products.Formulator.Field
import
ZMIField
from
Products.Formulator.Errors
import
FormValidationError
,
ValidationError
from
Selection
import
Selection
,
DomainSelection
from
Tool.SelectionTool
import
createFolderMixInPageSelectionMethod
from
.
Selection
import
Selection
,
DomainSelection
from
.
Tool.SelectionTool
import
createFolderMixInPageSelectionMethod
from
Products.ERP5Type.Utils
import
getPath
from
Products.ERP5Type.Utils
import
UpperCase
from
Products.ERP5Type.Document
import
newTempBase
...
...
product/ERP5Form/OOoChart.py
View file @
0df4c670
...
...
@@ -27,12 +27,13 @@
#
##############################################################################
from
__future__
import
absolute_import
from
ZTUtils
import
make_query
from
Products.Formulator
import
Widget
from
Products.Formulator
import
Widget
,
Validator
from
Products.Formulator.DummyField
import
fields
from
Products.Formulator.Field
import
ZMIField
from
Selection
import
Selection
from
.
Selection
import
Selection
from
Products.ERP5Type.Globals
import
get_request
from
zLOG
import
LOG
...
...
product/ERP5Form/PlanningBox.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2005,2007 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -46,8 +47,8 @@ from Products.Formulator.Field import ZMIField
from
Products.Formulator.DummyField
import
fields
from
Products.Formulator
import
Widget
,
Validator
from
Products.Formulator.Errors
import
FormValidationError
,
ValidationError
from
Tool.SelectionTool
import
makeTreeList
from
Selection
import
Selection
from
.
Tool.SelectionTool
import
makeTreeList
from
.
Selection
import
Selection
from
AccessControl
import
ClassSecurityInfo
from
zLOG
import
LOG
...
...
product/ERP5Form/Report.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -38,9 +39,9 @@ from urllib import quote
from
warnings
import
warn
from
Products.ERP5Type
import
PropertySheet
from
Form
import
ERP5Form
from
Form
import
create_settings_form
as
Form_create_settings_form
from
Selection
import
Selection
from
.
Form
import
ERP5Form
from
.
Form
import
create_settings_form
as
Form_create_settings_form
from
.
Selection
import
Selection
def
create_settings_form
():
form
=
Form_create_settings_form
()
...
...
product/ERP5Form/ZGDChart.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2003 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -30,7 +31,7 @@ from Products.Formulator import Widget
from
Products.Formulator
import
Widget
,
Validator
from
Products.Formulator.DummyField
import
fields
from
Products.Formulator.Field
import
ZMIField
from
Selection
import
Selection
from
.
Selection
import
Selection
from
zLOG
import
LOG
...
...
product/ERP5Form/ZPyChart.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2003-2006 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -31,7 +32,7 @@ from Products.Formulator import Widget
from
Products.Formulator
import
Widget
,
Validator
from
Products.Formulator.DummyField
import
fields
from
Products.Formulator.Field
import
ZMIField
from
Selection
import
Selection
from
.
Selection
import
Selection
from
Products.PythonScripts.PythonScript
import
PythonScript
try
:
...
...
product/ERP5Form/__init__.py
View file @
0df4c670
...
...
@@ -29,11 +29,13 @@
ERP5 is a set of components to implement an ERP
with Zope
"""
from
__future__
import
absolute_import
# Update ERP5 Globals
from
Products.ERP5Type.Utils
import
initializeProduct
,
updateGlobals
from
AccessControl
import
ModuleSecurityInfo
import
sys
,
Permissions
import
sys
from
.
import
Permissions
from
Products.PythonScripts.Utility
import
allow_class
from
AccessControl.SecurityInfo
import
allow_module
this_module
=
sys
.
modules
[
__name__
]
...
...
@@ -41,13 +43,13 @@ document_classes = updateGlobals( this_module, globals(),
permissions_module
=
Permissions
)
# Define object classes and tools
import
Form
,
FSForm
,
ListBox
,
ReportBox
,
MatrixBox
from
Tool
import
SelectionTool
import
OOoChart
,
PDFTemplate
,
Report
,
ParallelListField
import
PlanningBox
,
POSBox
,
FormBox
,
EditorField
,
ProxyField
,
DurationField
import
RelationField
,
ImageField
,
MultiRelationField
,
MultiLinkField
,
InputButtonField
import
CaptchaField
import
PreferenceTool
from
.
import
Form
,
FSForm
,
ListBox
,
ReportBox
,
MatrixBox
from
.
Tool
import
SelectionTool
from
.
import
OOoChart
,
PDFTemplate
,
Report
,
ParallelListField
from
.
import
PlanningBox
,
POSBox
,
FormBox
,
EditorField
,
ProxyField
,
DurationField
from
.
import
RelationField
,
ImageField
,
MultiRelationField
,
MultiLinkField
,
InputButtonField
from
.
import
CaptchaField
from
.
import
PreferenceTool
from
Products.Formulator.FieldRegistry
import
FieldRegistry
from
Products.Formulator
import
StandardFields
,
HelperFields
...
...
@@ -67,7 +69,7 @@ psyco.bind(ListBox.ListBoxValidator.validate)
# Finish installation
def
initialize
(
context
):
import
Document
from
.
import
Document
initializeProduct
(
context
,
this_module
,
globals
(),
document_module
=
Document
,
document_classes
=
document_classes
,
...
...
@@ -153,20 +155,20 @@ def initialize( context ):
FieldRegistry
.
registerField
(
HelperFields
.
MethodField
)
FieldRegistry
.
registerField
(
HelperFields
.
TALESField
)
import
HyperLinkField
from
.
import
HyperLinkField
FieldRegistry
.
registerField
(
HyperLinkField
.
HyperLinkField
,
'www/LinkField.gif'
)
import
VideoField
from
.
import
VideoField
FieldRegistry
.
registerField
(
VideoField
.
VideoField
,
'www/StringField.gif'
)
import
AudioField
from
.
import
AudioField
FieldRegistry
.
registerField
(
AudioField
.
AudioField
,
'www/StringField.gif'
)
import
GadgetField
from
.
import
GadgetField
FieldRegistry
.
registerField
(
GadgetField
.
GadgetField
,
'www/StringField.gif'
)
import
HoneypotField
from
.
import
HoneypotField
FieldRegistry
.
registerField
(
HoneypotField
.
HoneypotField
,
'www/StringField.gif'
)
...
...
@@ -194,7 +196,7 @@ def initialize( context ):
ModuleSecurityInfo
(
'Products.ERP5Form.Report'
).
declarePublic
(
'ReportSection'
,)
ModuleSecurityInfo
(
'Products.ERP5Form.MultiRelationField'
).
declarePublic
(
'SUB_FIELD_ID'
,)
allow_module
(
'Products.ERP5Form.Selection'
)
import
Selection
from
.
import
Selection
allow_class
(
Selection
)
__module_aliases__
=
(
'Products.ERP5Form.SelectionTool'
,
SelectionTool
),
...
...
product/ERP5OOo/OOoTemplate.py
View file @
0df4c670
...
...
@@ -27,6 +27,7 @@
#
##############################################################################
from
__future__
import
absolute_import
from
types
import
StringType
from
mimetypes
import
guess_extension
from
OFS.Image
import
File
...
...
@@ -40,7 +41,7 @@ from urllib import quote
from
Products.ERP5Type.Globals
import
InitializeClass
,
DTMLFile
,
get_request
from
Acquisition
import
aq_base
from
AccessControl
import
ClassSecurityInfo
from
OOoUtils
import
OOoBuilder
from
.
OOoUtils
import
OOoBuilder
from
zipfile
import
ZipFile
,
ZIP_DEFLATED
from
cStringIO
import
StringIO
import
re
...
...
product/ERP5OOo/__init__.py
View file @
0df4c670
...
...
@@ -30,11 +30,13 @@
ERP5OOo is a product containing general purpose tools to parse
and handle OpenOffice documents.
"""
from
__future__
import
absolute_import
# Update ERP5 Globals
from
Products.ERP5Type.Utils
import
initializeProduct
,
updateGlobals
from
AccessControl.SecurityInfo
import
allow_module
import
sys
,
Permissions
import
sys
from
.
import
Permissions
this_module
=
sys
.
modules
[
__name__
]
document_classes
=
updateGlobals
(
this_module
,
globals
(),
permissions_module
=
Permissions
)
...
...
@@ -44,8 +46,8 @@ ModuleSecurityInfo('Products.ERP5OOo.OOoUtils').declarePublic('OOoParser',)
ModuleSecurityInfo
(
'Products.ERP5OOo.OOoUtils'
).
declarePublic
(
'newOOoParser'
,)
# Define object classes and tools
from
OOoTemplate
import
OOoTemplate
from
FormPrintout
import
FormPrintout
from
.
OOoTemplate
import
OOoTemplate
from
.
FormPrintout
import
FormPrintout
object_classes
=
(
OOoTemplate
,
FormPrintout
)
portal_tools
=
()
content_classes
=
()
...
...
@@ -53,7 +55,7 @@ content_constructors = ()
# Finish installation
def
initialize
(
context
):
import
Document
from
.
import
Document
initializeProduct
(
context
,
this_module
,
globals
(),
document_module
=
Document
,
document_classes
=
document_classes
,
...
...
product/ERP5OOo/tests/testIngestionWithFlare.py
View file @
0df4c670
...
...
@@ -27,8 +27,9 @@
#
##############################################################################
from
__future__
import
absolute_import
import
unittest
from
testIngestion
import
TestIngestion
from
Products.ERP5OOo.tests.
testIngestion
import
TestIngestion
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
_getPersistentMemcachedServerDict
class
TestIngestionWithFlare
(
TestIngestion
):
...
...
product/ERP5OOo/tests/testOOoStyleWithFlare.py
View file @
0df4c670
...
...
@@ -26,8 +26,9 @@
#
##############################################################################
from
__future__
import
absolute_import
import
unittest
from
testOOoStyle
import
TestOOoStyle
from
Products.ERP5OOo.tests.
testOOoStyle
import
TestOOoStyle
class
TestOOoStyleWithFlare
(
TestOOoStyle
):
"""Tests ODF styles for ERP5 with Flare."""
...
...
product/ERP5OOo/transforms/html_to_odt.py
View file @
0df4c670
# -*- coding: utf-8 -*-
from
__future__
import
absolute_import
from
Products.PortalTransforms.interfaces
import
itransform
from
zope.interface
import
implements
from
oood_commandtransform
import
OOOdCommandTransform
,
OOoDocumentDataStream
from
oood_commandtransform
import
includeMetaContentType
from
.
oood_commandtransform
import
OOOdCommandTransform
,
OOoDocumentDataStream
from
.
oood_commandtransform
import
includeMetaContentType
from
zLOG
import
LOG
from
lxml
import
etree
,
html
from
lxml.etree
import
Element
,
SubElement
...
...
product/ERP5OOo/transforms/odt_to_doc.py
View file @
0df4c670
# -*- coding: utf-8 -*-
from
__future__
import
absolute_import
from
Products.PortalTransforms.interfaces
import
itransform
from
zope.interface
import
implements
from
oood_commandtransform
import
OOOdCommandTransform
,
OOoDocumentDataStream
from
.
oood_commandtransform
import
OOOdCommandTransform
,
OOoDocumentDataStream
from
zLOG
import
LOG
...
...
product/ERP5OOo/transforms/odt_to_pdf.py
View file @
0df4c670
# -*- coding: utf-8 -*-
from
__future__
import
absolute_import
from
Products.PortalTransforms.interfaces
import
itransform
from
zope.interface
import
implements
from
oood_commandtransform
import
OOOdCommandTransform
,
OOoDocumentDataStream
from
.
oood_commandtransform
import
OOOdCommandTransform
,
OOoDocumentDataStream
from
zLOG
import
LOG
...
...
product/ERP5OOo/transforms/odt_to_xml.py
View file @
0df4c670
# -*- coding: utf-8 -*-
from
__future__
import
absolute_import
from
Products.PortalTransforms.interfaces
import
itransform
from
zope.interface
import
implements
from
oood_commandtransform
import
OOOdCommandTransform
,
OOoDocumentDataStream
from
.
oood_commandtransform
import
OOOdCommandTransform
,
OOoDocumentDataStream
from
zLOG
import
LOG
from
Products.ERP5OOo.OOoUtils
import
OOoBuilder
import
re
...
...
product/ERP5Security/__init__.py
View file @
0df4c670
...
...
@@ -14,6 +14,7 @@
##############################################################################
""" ERP5Security product initialization.
"""
from
__future__
import
absolute_import
from
copy
import
deepcopy
from
collections
import
defaultdict
...
...
@@ -72,17 +73,17 @@ def _setUserNameForAccessLog(username, REQUEST):
def
initialize
(
context
):
import
ERP5UserManager
import
ERP5LoginUserManager
import
ERP5GroupManager
import
ERP5RoleManager
import
ERP5UserFactory
import
ERP5KeyAuthPlugin
import
ERP5ExternalAuthenticationPlugin
import
ERP5BearerExtractionPlugin
import
ERP5ExternalOauth2ExtractionPlugin
import
ERP5AccessTokenExtractionPlugin
import
ERP5DumbHTTPExtractionPlugin
from
.
import
ERP5UserManager
from
.
import
ERP5LoginUserManager
from
.
import
ERP5GroupManager
from
.
import
ERP5RoleManager
from
.
import
ERP5UserFactory
from
.
import
ERP5KeyAuthPlugin
from
.
import
ERP5ExternalAuthenticationPlugin
from
.
import
ERP5BearerExtractionPlugin
from
.
import
ERP5ExternalOauth2ExtractionPlugin
from
.
import
ERP5AccessTokenExtractionPlugin
from
.
import
ERP5DumbHTTPExtractionPlugin
registerMultiPlugin
(
ERP5UserManager
.
ERP5UserManager
.
meta_type
)
registerMultiPlugin
(
ERP5LoginUserManager
.
ERP5LoginUserManager
.
meta_type
)
...
...
product/ERP5Type/Accessor/Accessor.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002-2003 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -58,10 +59,10 @@ class Accessor(Method):
def
asAlias
(
self
,
id
):
# Returns an alias
from
Alias
import
Alias
from
.
Alias
import
Alias
return
Alias
(
id
,
self
.
__name__
)
def
asReindexAlias
(
self
,
id
):
# Returns a reindexing alias
from
Alias
import
ReindexAlias
from
.
Alias
import
ReindexAlias
return
ReindexAlias
(
id
,
self
.
__name__
)
product/ERP5Type/Accessor/Acquired.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002-2003 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -26,7 +27,7 @@
#
##############################################################################
from
Base
import
func_code
,
type_definition
,
list_types
,
ATTRIBUTE_PREFIX
,
Getter
as
BaseGetter
from
.
Base
import
func_code
,
type_definition
,
list_types
,
ATTRIBUTE_PREFIX
,
Getter
as
BaseGetter
from
Products.ERP5Type.PsycoWrapper
import
psyco
class
DefaultGetter
(
BaseGetter
):
...
...
product/ERP5Type/Accessor/AcquiredProperty.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002-2003 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -28,7 +29,7 @@
from
Acquisition
import
aq_base
from
ZPublisher.HTTPRequest
import
FileUpload
from
Base
import
func_code
,
type_definition
,
list_types
,
ATTRIBUTE_PREFIX
,
Getter
as
BaseGetter
,
Setter
as
BaseSetter
,
Tester
as
BaseTester
from
.
Base
import
func_code
,
type_definition
,
list_types
,
ATTRIBUTE_PREFIX
,
Getter
as
BaseGetter
,
Setter
as
BaseSetter
,
Tester
as
BaseTester
from
Products.ERP5Type.PsycoWrapper
import
psyco
from
zLOG
import
LOG
...
...
product/ERP5Type/Accessor/Alias.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2007 Nexedi SA and Contributors. All Rights Reserved.
...
...
@@ -26,7 +27,7 @@
#
##############################################################################
from
Base
import
Setter
from
.
Base
import
Setter
# Creation of default constructor
class
func_code
:
pass
...
...
product/ERP5Type/Accessor/Base.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002-2003 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -28,8 +29,8 @@
from
ZPublisher.HTTPRequest
import
FileUpload
from
TypeDefinition
import
type_definition
,
list_types
,
ATTRIBUTE_PREFIX
from
Accessor
import
Accessor
as
Method
from
.
TypeDefinition
import
type_definition
,
list_types
,
ATTRIBUTE_PREFIX
from
.
Accessor
import
Accessor
as
Method
from
Acquisition
import
aq_base
from
zLOG
import
LOG
...
...
product/ERP5Type/Accessor/Category.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002-2003 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -28,7 +29,7 @@
from
collections
import
OrderedDict
from
Base
import
func_code
,
type_definition
,
list_types
,
ATTRIBUTE_PREFIX
,
Setter
as
BaseSetter
,
Getter
as
BaseGetter
from
.
Base
import
func_code
,
type_definition
,
list_types
,
ATTRIBUTE_PREFIX
,
Setter
as
BaseSetter
,
Getter
as
BaseGetter
from
zLOG
import
LOG
from
Products.ERP5Type.PsycoWrapper
import
psyco
...
...
product/ERP5Type/Accessor/Constant.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002-2009 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -27,7 +28,7 @@
#
##############################################################################
from
Accessor
import
Accessor
from
.
Accessor
import
Accessor
# Creation of default constructor
class
func_code
:
pass
...
...
product/ERP5Type/Accessor/Content.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002-2003 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -26,8 +27,8 @@
#
##############################################################################
from
Base
import
func_code
,
type_definition
,
list_types
,
ATTRIBUTE_PREFIX
,
Method
import
Base
from
.
Base
import
func_code
,
type_definition
,
list_types
,
ATTRIBUTE_PREFIX
,
Method
from
.
import
Base
from
Products.ERP5Type.PsycoWrapper
import
psyco
Setter
=
Base
.
Setter
...
...
product/ERP5Type/Accessor/ContentProperty.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002-2003 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -29,8 +30,8 @@
from
Acquisition
import
aq_base
from
ZPublisher.HTTPRequest
import
FileUpload
from
Base
import
func_code
,
type_definition
,
ATTRIBUTE_PREFIX
,
Method
import
Base
from
.
Base
import
func_code
,
type_definition
,
ATTRIBUTE_PREFIX
,
Method
from
.
import
Base
from
Products.ERP5Type.PsycoWrapper
import
psyco
Setter
=
Base
.
Setter
...
...
product/ERP5Type/Accessor/List.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002-2003 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -27,10 +28,10 @@
##############################################################################
from
Base
import
func_code
,
type_definition
,
list_types
,
\
from
.
Base
import
func_code
,
type_definition
,
list_types
,
\
ATTRIBUTE_PREFIX
,
Method
,
evaluateTales
from
TypeDefinition
import
asList
,
identity
import
Base
from
.
TypeDefinition
import
asList
,
identity
from
.
import
Base
from
Products.ERP5Type.PsycoWrapper
import
psyco
from
Acquisition
import
aq_base
from
types
import
ListType
,
TupleType
...
...
product/ERP5Type/Accessor/Related.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002-2007 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -26,7 +27,7 @@
#
##############################################################################
from
Base
import
func_code
,
type_definition
,
list_types
,
ATTRIBUTE_PREFIX
,
Getter
as
BaseGetter
,
Setter
as
BaseSetter
from
.
Base
import
func_code
,
type_definition
,
list_types
,
ATTRIBUTE_PREFIX
,
Getter
as
BaseGetter
,
Setter
as
BaseSetter
from
Products.ERP5Type.PsycoWrapper
import
psyco
from
zLOG
import
LOG
from
zLOG
import
WARNING
...
...
product/ERP5Type/Accessor/RelatedValue.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002-2007 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -26,7 +27,7 @@
#
##############################################################################
from
Base
import
func_code
,
type_definition
,
list_types
,
\
from
.
Base
import
func_code
,
type_definition
,
list_types
,
\
ATTRIBUTE_PREFIX
,
Getter
as
BaseGetter
,
Setter
as
BaseSetter
from
Products.ERP5Type.PsycoWrapper
import
psyco
from
zLOG
import
LOG
...
...
product/ERP5Type/Accessor/Value.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002-2003 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -28,7 +29,7 @@
from
collections
import
OrderedDict
from
operator
import
methodcaller
from
Base
import
func_code
,
type_definition
,
list_types
,
ATTRIBUTE_PREFIX
,
Setter
as
BaseSetter
,
Getter
as
BaseGetter
from
.
Base
import
func_code
,
type_definition
,
list_types
,
ATTRIBUTE_PREFIX
,
Setter
as
BaseSetter
,
Getter
as
BaseGetter
from
zLOG
import
LOG
from
Products.ERP5Type.PsycoWrapper
import
psyco
from
Products.ERP5Type.Utils
import
convertToUpperCase
...
...
product/ERP5Type/Accessor/WorkflowHistory.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2018 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -26,7 +27,7 @@
##############################################################################
from
Products.ERP5Type.PsycoWrapper
import
psyco
from
Base
import
Getter
as
BaseGetter
from
.
Base
import
Getter
as
BaseGetter
from
Acquisition
import
aq_base
class
ListGetter
(
BaseGetter
):
...
...
product/ERP5Type/Accessor/WorkflowState.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002-2003 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -28,7 +29,7 @@
from
Acquisition
import
aq_base
from
Products.ERP5Type.PsycoWrapper
import
psyco
from
Base
import
Getter
as
BaseGetter
,
Setter
as
BaseSetter
from
.
Base
import
Getter
as
BaseGetter
,
Setter
as
BaseSetter
from
warnings
import
warn
# Creation of default constructor
...
...
product/ERP5Type/Base.py
View file @
0df4c670
...
...
@@ -27,6 +27,7 @@
#
##############################################################################
from
__future__
import
absolute_import
from
struct
import
unpack
from
copy
import
copy
import
warnings
...
...
@@ -72,13 +73,13 @@ from Products.ERP5Type.Accessor import Base as BaseAccessor
from
Products.ERP5Type.mixin.property_translatable
import
PropertyTranslatableBuiltInDictMixIn
from
Products.ERP5Type.XMLExportImport
import
Base_asXML
from
Products.ERP5Type.Cache
import
CachingMethod
,
clearCache
,
getReadOnlyTransactionCache
from
Accessor
import
WorkflowState
from
.
Accessor
import
WorkflowState
from
Products.ERP5Type.TransactionalVariable
import
getTransactionalVariable
from
Products.ERP5Type.Accessor.TypeDefinition
import
type_definition
from
CopySupport
import
CopyContainer
,
CopyError
,
\
from
.
CopySupport
import
CopyContainer
,
CopyError
,
\
tryMethodCallWithTemporaryPermission
from
Errors
import
DeferredCatalogError
,
UnsupportedWorkflowMethod
from
.
Errors
import
DeferredCatalogError
,
UnsupportedWorkflowMethod
from
Products.CMFActivity.ActiveObject
import
ActiveObject
from
Products.ERP5Type.Accessor.Accessor
import
Accessor
as
Method
from
Products.ERP5Type.Message
import
Message
...
...
product/ERP5Type/Cache.py
View file @
0df4c670
...
...
@@ -27,13 +27,14 @@
#
##############################################################################
from
__future__
import
absolute_import
import
string
from
contextlib
import
contextmanager
from
time
import
time
from
AccessControl
import
allow_class
,
ClassSecurityInfo
from
Acquisition
import
aq_base
from
BTrees.Length
import
Length
from
CachePlugins.BaseCache
import
CachedMethodError
from
.
CachePlugins.BaseCache
import
CachedMethodError
from
persistent
import
Persistent
from
zLOG
import
LOG
,
WARNING
from
Products.ERP5Type
import
Permissions
...
...
product/ERP5Type/CachePlugins/DistributedRamCache.py
View file @
0df4c670
...
...
@@ -30,10 +30,11 @@
"""
Memcached based cache plugin.
"""
from
__future__
import
absolute_import
from
threading
import
local
from
zLOG
import
LOG
,
WARNING
from
BaseCache
import
BaseCache
from
BaseCache
import
CacheEntry
from
.
BaseCache
import
BaseCache
from
.
BaseCache
import
CacheEntry
from
Products.ERP5Type
import
interfaces
import
zope.interface
from
base64
import
encodestring
...
...
product/ERP5Type/CachePlugins/DummyCache.py
View file @
0df4c670
...
...
@@ -27,8 +27,9 @@
##############################################################################
"Dummy (no cache)"
from
__future__
import
absolute_import
from
BaseCache
import
BaseCache
from
.
BaseCache
import
BaseCache
class
DummyCache
(
BaseCache
):
""" Dummy cache plugin. """
...
...
product/ERP5Type/CachePlugins/RamCache.py
View file @
0df4c670
...
...
@@ -30,9 +30,10 @@
"""
Local RAM based cache plugin.
"""
from
__future__
import
absolute_import
import
time
from
BaseCache
import
BaseCache
,
CacheEntry
from
.
BaseCache
import
BaseCache
,
CacheEntry
from
Products.ERP5Type
import
interfaces
import
zope.interface
...
...
product/ERP5Type/Constraint/AttributeBlacklisted.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002, 2009 Nexedi SA and Contributors. All Rights Reserved.
...
...
@@ -26,7 +27,7 @@
#
##############################################################################
from
PropertyExistence
import
PropertyExistence
from
.
PropertyExistence
import
PropertyExistence
from
Products.CMFCore.Expression
import
Expression
class
AttributeBlacklisted
(
PropertyExistence
):
...
...
product/ERP5Type/Constraint/AttributeEquality.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002, 2005 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -28,7 +29,7 @@
#
##############################################################################
from
PropertyExistence
import
PropertyExistence
from
.
PropertyExistence
import
PropertyExistence
class
AttributeEquality
(
PropertyExistence
):
"""
...
...
product/ERP5Type/Constraint/AttributeUnicity.py
View file @
0df4c670
...
...
@@ -30,7 +30,8 @@
#
##############################################################################
from
PropertyExistence
import
PropertyExistence
from
__future__
import
absolute_import
from
.PropertyExistence
import
PropertyExistence
from
Products.CMFCore.Expression
import
Expression
class
AttributeUnicity
(
PropertyExistence
):
...
...
product/ERP5Type/Constraint/CategoryAcquiredMembershipArity.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002, 2005 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -27,7 +28,7 @@
#
##############################################################################
from
Constraint
import
Constraint
from
.
Constraint
import
Constraint
from
Products.ERP5Type.Constraint.CategoryMembershipArity
\
import
CategoryMembershipArity
...
...
product/ERP5Type/Constraint/CategoryExistence.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002, 2005 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -27,7 +28,7 @@
#
##############################################################################
from
Constraint
import
Constraint
from
.
Constraint
import
Constraint
class
CategoryExistence
(
Constraint
):
"""This constraint checks if an object respects the existence of
...
...
product/ERP5Type/Constraint/CategoryMembershipArity.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002, 2005 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -27,7 +28,7 @@
#
##############################################################################
from
Constraint
import
Constraint
from
.
Constraint
import
Constraint
class
CategoryMembershipArity
(
Constraint
):
"""
...
...
product/ERP5Type/Constraint/CategoryRelatedMembershipArity.py
View file @
0df4c670
...
...
@@ -28,7 +28,8 @@
#
##############################################################################
from
Constraint
import
Constraint
from
__future__
import
absolute_import
from
.Constraint
import
Constraint
from
Products.ERP5Type.Constraint.CategoryMembershipArity
\
import
CategoryMembershipArity
...
...
product/ERP5Type/Constraint/PortalTypeClass.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002, 2005 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -26,7 +27,7 @@
#
##############################################################################
from
Constraint
import
Constraint
from
.
Constraint
import
Constraint
from
Products.CMFCore.utils
import
getToolByName
from
Products.ERP5Type.Cache
import
CachingMethod
...
...
product/ERP5Type/Constraint/PropertyExistence.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002, 2005 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -27,7 +28,7 @@
#
##############################################################################
from
Constraint
import
Constraint
from
.
Constraint
import
Constraint
class
PropertyExistence
(
Constraint
):
"""
...
...
product/ERP5Type/Constraint/PropertyTypeValidity.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002-2012 Nexedi SA and Contributors. All Rights Reserved.
...
...
@@ -28,7 +29,7 @@
#
##############################################################################
from
Constraint
import
Constraint
from
.
Constraint
import
Constraint
from
DateTime
import
DateTime
boolean_type_list
=
(
int
,
bool
)
...
...
product/ERP5Type/Constraint/TALESConstraint.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -36,7 +37,7 @@ CompilerError = Products.PageTemplates.Expressions.getEngine().getCompilerError(
from
zLOG
import
LOG
,
PROBLEM
from
Constraint
import
Constraint
from
.
Constraint
import
Constraint
class
TALESConstraint
(
Constraint
):
"""This constraint uses an arbitrary TALES expression on the context of the
...
...
product/ERP5Type/Constraint/__init__.py
View file @
0df4c670
# -*- coding: utf-8 -*-
from
Constraint
import
Constraint
from
PropertyTypeValidity
import
PropertyTypeValidity
from
CategoryMembershipArity
import
CategoryMembershipArity
from
CategoryRelatedMembershipArity
import
CategoryRelatedMembershipArity
from
AttributeEquality
import
AttributeEquality
from
AttributeUnicity
import
AttributeUnicity
from
AttributeBlacklisted
import
AttributeBlacklisted
from
PropertyExistence
import
PropertyExistence
from
CategoryExistence
import
CategoryExistence
from
CategoryExistence
import
CategoryAcquiredExistence
from
PortalTypeClass
import
PortalTypeClass
from
CategoryAcquiredMembershipArity
import
CategoryAcquiredMembershipArity
from
TALESConstraint
import
TALESConstraint
from
ContentExistence
import
ContentExistence
from
StringAttributeMatch
import
StringAttributeMatch
from
CategoryMembershipState
import
CategoryMembershipState
from
CategoryAcquiredMembershipState
import
CategoryAcquiredMembershipState
from
CategoryRelatedMembershipState
import
CategoryRelatedMembershipState
from
__future__
import
absolute_import
from
.Constraint
import
Constraint
from
.PropertyTypeValidity
import
PropertyTypeValidity
from
.CategoryMembershipArity
import
CategoryMembershipArity
from
.CategoryRelatedMembershipArity
import
CategoryRelatedMembershipArity
from
.AttributeEquality
import
AttributeEquality
from
.AttributeUnicity
import
AttributeUnicity
from
.AttributeBlacklisted
import
AttributeBlacklisted
from
.PropertyExistence
import
PropertyExistence
from
.CategoryExistence
import
CategoryExistence
from
.CategoryExistence
import
CategoryAcquiredExistence
from
.PortalTypeClass
import
PortalTypeClass
from
.CategoryAcquiredMembershipArity
import
CategoryAcquiredMembershipArity
from
.TALESConstraint
import
TALESConstraint
from
.ContentExistence
import
ContentExistence
from
.StringAttributeMatch
import
StringAttributeMatch
from
.CategoryMembershipState
import
CategoryMembershipState
from
.CategoryAcquiredMembershipState
import
CategoryAcquiredMembershipState
from
.CategoryRelatedMembershipState
import
CategoryRelatedMembershipState
product/ERP5Type/ERP5Type.py
View file @
0df4c670
...
...
@@ -21,6 +21,7 @@
#
##############################################################################
from
__future__
import
absolute_import
from
functools
import
partial
import
zope.interface
from
Products.ERP5Type.Globals
import
InitializeClass
...
...
@@ -43,7 +44,7 @@ from Products.ERP5Type.dynamic.accessor_holder import getPropertySheetValueList,
ERP5TYPE_SECURITY_GROUP_ID_GENERATION_SCRIPT
=
'ERP5Type_asSecurityGroupId'
from
TranslationProviderBase
import
TranslationProviderBase
from
.
TranslationProviderBase
import
TranslationProviderBase
from
Products.ERP5Type.Accessor.Constant
import
PropertyGetter
as
ConstantGetter
from
Products.ERP5Type.Accessor.Translation
import
TRANSLATION_DOMAIN_CONTENT_TRANSLATION
from
zLOG
import
LOG
,
ERROR
...
...
product/ERP5Type/InitGenerator.py
View file @
0df4c670
...
...
@@ -29,6 +29,7 @@
##############################################################################
from
__future__
import
absolute_import
import
os
,
re
,
string
,
sys
from
Products.ERP5Type
import
document_class_registry
from
Products.ERP5Type.Globals
import
package_home
,
InitializeClass
...
...
@@ -55,7 +56,7 @@ def InitializeInteractor(interactor_class, interactor_path=None):
product_interactor_registry
.
append
(((
interactor_class
,
interactor_path
)))
def
initializeProductDocumentRegistry
():
from
Utils
import
importLocalDocument
from
.
Utils
import
importLocalDocument
count
=
len
(
product_document_registry
)
for
(
class_id
,
class_path
)
in
product_document_registry
.
iteritems
():
importLocalDocument
(
class_id
,
class_path
=
class_path
)
...
...
@@ -68,7 +69,7 @@ def initializeProductDocumentRegistry():
assert
count
==
len
(
product_document_registry
)
def
initializeProductInteractorRegistry
():
from
Utils
import
importLocalInteractor
from
.
Utils
import
importLocalInteractor
for
(
class_id
,
interactor_path
)
in
product_interactor_registry
:
if
class_id
!=
'Interactor'
:
# Base class can not be global and placeless
importLocalInteractor
(
class_id
,
path
=
interactor_path
)
...
...
product/ERP5Type/TranslationProviderBase.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002 Zope Corporation and Contributors. All Rights Reserved.
...
...
@@ -13,7 +14,7 @@
##############################################################################
from
Products.ERP5Type.Globals
import
InitializeClass
from
AccessControl
import
ClassSecurityInfo
from
Permissions
import
AccessContentsInformation
,
ManagePortal
,
\
from
.
Permissions
import
AccessContentsInformation
,
ManagePortal
,
\
ModifyPortalContent
from
OFS.SimpleItem
import
SimpleItem
from
Acquisition
import
aq_base
...
...
product/ERP5Type/Utils.py
View file @
0df4c670
...
...
@@ -28,6 +28,7 @@
##############################################################################
# Required modules - some modules are imported later to prevent circular deadlocks
from
__future__
import
absolute_import
import
os
import
re
import
string
...
...
@@ -114,8 +115,8 @@ from Products.ERP5Type.Globals import get_request
# Compatibility - XXX - BAD
#####################################################
from
Accessor.TypeDefinition
import
type_definition
from
Accessor.TypeDefinition
import
list_types
from
.
Accessor.TypeDefinition
import
type_definition
from
.
Accessor.TypeDefinition
import
list_types
#####################################################
# Generic sort method
...
...
@@ -551,7 +552,7 @@ def checkPythonSourceCode(source_code_str, portal_type=None):
# Globals initialization
#####################################################
from
InitGenerator
import
InitializeDocument
,
InitializeInteractor
,
registerInteractorClass
from
.
InitGenerator
import
InitializeDocument
,
InitializeInteractor
,
registerInteractorClass
# List Regexp
python_file_expr
=
re
.
compile
(
"py$"
)
...
...
@@ -641,7 +642,7 @@ import imp
from
App.config
import
getConfiguration
from
Products.ERP5Type.Globals
import
InitializeClass
from
Accessor.Base
import
func_code
from
.
Accessor.Base
import
func_code
from
Products.CMFCore.utils
import
manage_addContentForm
,
manage_addContent
from
AccessControl.PermissionRole
import
PermissionRole
...
...
product/ERP5Type/XMLObject.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -33,7 +34,7 @@ from Products.ERP5Type import _dtmldir
from
Products.ERP5Type
import
PropertySheet
,
Permissions
from
Products.ERP5Type.Utils
import
convertToUpperCase
from
Core.Folder
import
Folder
from
.
Core.Folder
import
Folder
from
zLOG
import
LOG
class
XMLObject
(
Folder
):
...
...
product/ERP5Type/__init__.py
View file @
0df4c670
...
...
@@ -30,8 +30,9 @@
ERP5Type is provides a RAD environment for Zope / CMF
All ERP5 classes derive from ERP5Type
"""
from
__future__
import
absolute_import
from
App.config
import
getConfiguration
from
patches
import
python
,
pylint
,
globalrequest
from
.
patches
import
python
,
pylint
,
globalrequest
from
zLOG
import
LOG
,
INFO
DISPLAY_BOOT_PROCESS
=
False
...
...
@@ -60,14 +61,15 @@ mixin_class_registry = {}
# old class definitions will still work with properties such as
# property_sheets = (ERP5Type.PropertySheet.YYY, ... )
# after transforming 'YYY' into a ZODB property sheet
from
dynamic.dynamic_module
import
registerDynamicModule
from
.
dynamic.dynamic_module
import
registerDynamicModule
PropertySheet
=
registerDynamicModule
(
'Products.ERP5Type.PropertySheet'
,
lambda
name
:
name
)
# Switch(es) for ongoing development which require single code base
# Update ERP5 Globals
import
sys
,
Permissions
,
os
import
sys
,
os
from
.
import
Permissions
from
App.Common
import
package_home
this_module
=
sys
.
modules
[
__name__
]
product_path
=
package_home
(
globals
()
)
...
...
@@ -78,8 +80,8 @@ document_classes = updateGlobals( this_module,
permissions_module
=
Permissions
,
is_erp5_type
=
1
)
import
ZopePatch
import
interfaces
from
.
import
ZopePatch
from
.
import
interfaces
import
Products.Localizer
# So that we make sure Globals.get_request is available
...
...
@@ -88,14 +90,14 @@ import Products.ERP5Type.Workflow
def
initialize
(
context
):
# Import Product Components
from
Tool
import
(
CacheTool
,
MemcachedTool
,
from
.
Tool
import
(
CacheTool
,
MemcachedTool
,
TypesTool
,
PropertySheetTool
,
ComponentTool
)
import
Document
from
Base
import
Base
import
XMLObject
from
ERP5Type
import
ERP5TypeInformation
import
CodingStyle
from
.
import
Document
from
.
Base
import
Base
from
.
import
XMLObject
from
.
ERP5Type
import
ERP5TypeInformation
from
.
import
CodingStyle
# Define documents, classes, constructors and tools
object_classes
=
()
content_constructors
=
()
...
...
product/ERP5Type/dynamic/dynamic_module.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2010-2012 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -205,7 +206,7 @@ def initializeDynamicModules():
erp5
.
document
=
ModuleType
(
"erp5.document"
)
# Portal types as classes
from
accessor_holder
import
AccessorHolderType
,
AccessorHolderModuleType
from
.
accessor_holder
import
AccessorHolderType
,
AccessorHolderModuleType
erp5
.
accessor_holder
=
AccessorHolderModuleType
(
"erp5.accessor_holder"
)
erp5
.
accessor_holder
.
__path__
=
[]
...
...
@@ -217,18 +218,18 @@ def initializeDynamicModules():
'erp5.accessor_holder.portal_type'
,
AccessorHolderModuleType
)
from
lazy_class
import
generateLazyPortalTypeClass
from
.
lazy_class
import
generateLazyPortalTypeClass
erp5
.
portal_type
=
registerDynamicModule
(
'erp5.portal_type'
,
generateLazyPortalTypeClass
)
from
portal_type_class
import
loadTempPortalTypeClass
from
.
portal_type_class
import
loadTempPortalTypeClass
erp5
.
temp_portal_type
=
registerDynamicModule
(
'erp5.temp_portal_type'
,
loadTempPortalTypeClass
)
# ZODB Components
erp5
.
component
=
ComponentPackageType
(
"erp5.component"
)
from
component_package
import
(
ComponentDynamicPackage
,
from
.
component_package
import
(
ComponentDynamicPackage
,
ToolComponentDynamicPackage
)
# Prevent other threads to create erp5.* packages and modules or seeing them
...
...
product/ERP5Type/dynamic/lazy_class.py
View file @
0df4c670
# -*- coding: utf-8 -*-
from
__future__
import
absolute_import
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Type.Accessor.Constant
import
Getter
as
ConstantGetter
from
Products.ERP5Type.Globals
import
InitializeClass
...
...
@@ -15,9 +16,9 @@ from ZODB.broken import Broken, PersistentBroken
from
AccessControl
import
ClassSecurityInfo
from
zLOG
import
LOG
,
WARNING
,
BLATHER
from
portal_type_class
import
generatePortalTypeClass
from
accessor_holder
import
AccessorHolderType
import
persistent_migration
from
.
portal_type_class
import
generatePortalTypeClass
from
.
accessor_holder
import
AccessorHolderType
from
.
import
persistent_migration
from
ZODB.POSException
import
ConflictError
class
ERP5BaseBroken
(
Broken
,
ERP5Base
,
PersistentBroken
):
...
...
product/ERP5Type/interfaces/__init__.py
View file @
0df4c670
# -*- coding: utf-8 -*-
# XXX/FIXME: tried to work without explicit definition of all interfaces (this
# file empty) but failed to do so
from
consistency_message
import
IConsistencyMessage
from
object_message
import
IObjectMessage
from
action_provider
import
IAction
,
IActionContainer
from
cache_plugin
import
ICachePlugin
from
category_access_provider
import
ICategoryAccessProvider
from
value_access_provider
import
IValueAccessProvider
from
constraint
import
IConstraint
from
role_provider
import
ILocalRoleAssignor
,
ILocalRoleGenerator
from
types_tool
import
ITypesTool
,
ITypeProvider
from
__future__
import
absolute_import
from
.consistency_message
import
IConsistencyMessage
from
.object_message
import
IObjectMessage
from
.action_provider
import
IAction
,
IActionContainer
from
.cache_plugin
import
ICachePlugin
from
.category_access_provider
import
ICategoryAccessProvider
from
.value_access_provider
import
IValueAccessProvider
from
.constraint
import
IConstraint
from
.role_provider
import
ILocalRoleAssignor
,
ILocalRoleGenerator
from
.types_tool
import
ITypesTool
,
ITypeProvider
product/ERP5Type/tests/runTestSuite.py
View file @
0df4c670
#!/usr/bin/env python2.7
from
__future__
import
absolute_import
import
argparse
,
sys
,
os
,
textwrap
from
erp5.util
import
taskdistribution
# XXX: This import is required, just to populate sys.modules['test_suite'].
# Even if it's not used in this file. Yuck.
import
ERP5TypeTestSuite
from
.
import
ERP5TypeTestSuite
def
_parsingErrorHandler
(
data
,
_
):
print
>>
sys
.
stderr
,
'Error parsing data:'
,
repr
(
data
)
...
...
product/ERP5Workflow/__init__.py
View file @
0df4c670
...
...
@@ -29,11 +29,12 @@
ERP5Workflow is a product containing Document to create
workflow in the ERP5 way.
"""
from
__future__
import
absolute_import
# Update ERP5 Globals
from
Products.ERP5Type.Utils
import
initializeProduct
,
updateGlobals
import
sys
import
Permissions
from
.
import
Permissions
this_module
=
sys
.
modules
[
__name__
]
document_classes
=
updateGlobals
(
this_module
,
globals
(),
permissions_module
=
Permissions
)
...
...
@@ -46,7 +47,7 @@ content_constructors = ()
# Finish installation
def
initialize
(
context
):
import
Document
from
.
import
Document
initializeProduct
(
context
,
this_module
,
globals
(),
document_module
=
Document
,
document_classes
=
document_classes
,
...
...
product/Formulator/DummyField.py
View file @
0df4c670
...
...
@@ -8,8 +8,9 @@ When the field classes have been defined, get_field()
can be used on FieldProperty objects to get an
actual field object.
"""
from
__future__
import
absolute_import
from
FieldRegistry
import
FieldRegistry
from
.
FieldRegistry
import
FieldRegistry
class
DummyFieldFactory
:
def
__getattr__
(
self
,
name
):
...
...
product/Formulator/Field.py
View file @
0df4c670
# -*- coding: utf-8 -*-
from
__future__
import
absolute_import
from
App.class_init
import
default__class_init__
as
InitializeClass
import
Acquisition
from
Persistence
import
Persistent
...
...
@@ -6,7 +7,7 @@ from App.special_dtml import DTMLFile
from
AccessControl
import
ClassSecurityInfo
import
OFS
from
Shared.DC.Scripts.Bindings
import
Bindings
from
Errors
import
ValidationError
from
.
Errors
import
ValidationError
from
Products.Formulator.Widget
import
MultiItemsWidget
from
zLOG
import
LOG
from
lxml
import
etree
...
...
@@ -648,7 +649,7 @@ class ZMIField(
"""Change TALES expressions through XMLRPC.
"""
# BEWARE: there is no validation on the values passed through the map
from
TALESField
import
TALESMethod
from
.
TALESField
import
TALESMethod
result
=
{}
for
key
,
value
in
map
.
items
():
if
value
:
...
...
product/Formulator/FieldRegistry.py
View file @
0df4c670
from
__future__
import
absolute_import
import
os
import
OFS
from
App.ImageFile
import
ImageFile
from
FieldHelpTopic
import
FieldHelpTopic
from
.
FieldHelpTopic
import
FieldHelpTopic
class
FieldRegistry
:
"""A registry of fields, maintaining a dictionary with
...
...
@@ -62,8 +63,8 @@ def initializeFieldForm(field_class):
"""Initialize the properties (fields and values) on a particular
field class. Also add the tales and override methods.
"""
from
Form
import
BasicForm
from
DummyField
import
fields
from
.
Form
import
BasicForm
from
.
DummyField
import
fields
form
=
BasicForm
()
override_form
=
BasicForm
()
...
...
product/Formulator/Form.py
View file @
0df4c670
from
__future__
import
absolute_import
import
AccessControl
import
OFS
from
App.class_init
import
default__class_init__
as
InitializeClass
...
...
@@ -15,12 +16,12 @@ import os
import
string
from
StringIO
import
StringIO
from
Errors
import
ValidationError
,
FormValidationError
,
FieldDisabledError
from
FieldRegistry
import
FieldRegistry
from
Widget
import
render_tag
from
DummyField
import
fields
from
FormToXML
import
formToXML
from
XMLToForm
import
XMLToForm
from
.
Errors
import
ValidationError
,
FormValidationError
,
FieldDisabledError
from
.
FieldRegistry
import
FieldRegistry
from
.
Widget
import
render_tag
from
.
DummyField
import
fields
from
.
FormToXML
import
formToXML
from
.
XMLToForm
import
XMLToForm
from
ComputedAttribute
import
ComputedAttribute
...
...
product/Formulator/HelperFields.py
View file @
0df4c670
from
__future__
import
absolute_import
# include some helper fields which are in their own files
from
MethodField
import
MethodField
from
ListTextAreaField
import
ListTextAreaField
from
TALESField
import
TALESField
from
.
MethodField
import
MethodField
from
.
ListTextAreaField
import
ListTextAreaField
from
.
TALESField
import
TALESField
product/Formulator/ListTextAreaField.py
View file @
0df4c670
from
__future__
import
absolute_import
import
string
from
DummyField
import
fields
import
Widget
,
Validator
from
Field
import
ZMIField
from
.
DummyField
import
fields
from
.
import
Widget
,
Validator
from
.
Field
import
ZMIField
class
ListTextAreaWidget
(
Widget
.
TextAreaWidget
):
default
=
fields
.
ListTextAreaField
(
'default'
,
...
...
product/Formulator/MethodField.py
View file @
0df4c670
from
__future__
import
absolute_import
import
string
from
DummyField
import
fields
import
Widget
,
Validator
from
.
DummyField
import
fields
from
.
import
Widget
,
Validator
from
Persistence
import
Persistent
import
Acquisition
from
Field
import
ZMIField
from
.
Field
import
ZMIField
from
AccessControl
import
getSecurityManager
,
ClassSecurityInfo
class
MethodWidget
(
Widget
.
TextWidget
):
...
...
product/Formulator/ProductForm.py
View file @
0df4c670
...
...
@@ -5,13 +5,14 @@ This file is an adaptation from part of Plone's FormTool.py tool.
It provides a wrapping around Formulator.BasicForm, allowing it
to be created inside a product but used outside it.
"""
from
__future__
import
absolute_import
import
string
from
AccessControl
import
ClassSecurityInfo
from
App.class_init
import
default__class_init__
as
InitializeClass
import
FormValidationError
,
BasicForm
import
StandardFields
from
.
import
StandardFields
class
ProductForm
(
BasicForm
):
"""Wraps Formulator.BasicForm and provides some convenience methods that
...
...
product/Formulator/StandardFields.py
View file @
0df4c670
from
Form
import
BasicForm
from
Field
import
ZMIField
from
DummyField
import
fields
from
MethodField
import
BoundMethod
from
__future__
import
absolute_import
from
.Form
import
BasicForm
from
.Field
import
ZMIField
from
.DummyField
import
fields
from
.MethodField
import
BoundMethod
from
DateTime
import
DateTime
import
Validator
,
Widget
from
.
import
Validator
,
Widget
import
OFS
class
StringField
(
ZMIField
):
...
...
product/Formulator/TALESField.py
View file @
0df4c670
from
__future__
import
absolute_import
import
string
from
DummyField
import
fields
import
Widget
,
Validator
from
.
DummyField
import
fields
from
.
import
Widget
,
Validator
from
Persistence
import
Persistent
import
Acquisition
from
Field
import
ZMIField
from
.
Field
import
ZMIField
from
AccessControl
import
getSecurityManager
class
TALESWidget
(
Widget
.
TextWidget
):
...
...
product/Formulator/Validator.py
View file @
0df4c670
# -*- coding: utf-8 -*-
from
__future__
import
absolute_import
import
re
import
PatternChecker
from
DummyField
import
fields
from
.
import
PatternChecker
from
.
DummyField
import
fields
from
DateTime
import
DateTime
from
threading
import
Thread
from
urllib
import
urlopen
from
urlparse
import
urljoin
from
Errors
import
ValidationError
from
.
Errors
import
ValidationError
from
DateTime.DateTime
import
DateError
,
TimeError
import
unicodedata
...
...
product/Formulator/Widget.py
View file @
0df4c670
# -*- coding: utf-8 -*-
from
__future__
import
absolute_import
import
string
from
DummyField
import
fields
from
.
DummyField
import
fields
from
DocumentTemplate.DT_Util
import
html_quote
from
DateTime
import
DateTime
,
Timezones
from
cgi
import
escape
...
...
product/Formulator/XMLToForm.py
View file @
0df4c670
# -*- coding: utf-8 -*-
import
XMLObjects
from
__future__
import
absolute_import
# -*- coding: utf-8 -*-
from
.
import
XMLObjects
from
Products.Formulator.TALESField
import
TALESMethod
from
Products.Formulator.MethodField
import
Method
...
...
product/Formulator/__init__.py
View file @
0df4c670
import
Form
import
StandardFields
,
HelperFields
from
FieldRegistry
import
FieldRegistry
import
Errors
from
__future__
import
absolute_import
from
.
import
Form
from
.
import
StandardFields
,
HelperFields
from
.FieldRegistry
import
FieldRegistry
from
.
import
Errors
from
Products.PythonScripts.Utility
import
allow_module
try
:
...
...
@@ -12,7 +13,7 @@ try:
except
ImportError
:
pass
else
:
import
FSForm
from
.
import
FSForm
# Allow Errors to be imported TTW
allow_module
(
'Products.Formulator.Errors'
)
...
...
product/HBTreeFolder2/__init__.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
...
...
@@ -12,7 +13,7 @@
#
##############################################################################
import
HBTreeFolder2
from
.
import
HBTreeFolder2
def
initialize
(
context
):
...
...
@@ -33,7 +34,7 @@ def initialize(context):
pass
else
:
# CMF installed; make available a special folder type.
import
CMFHBTreeFolder
from
.
import
CMFHBTreeFolder
ADD_FOLDERS_PERMISSION
=
'Add portal folders'
utils
.
ContentInit
(
...
...
product/Localizer/LanguageManager.py
View file @
0df4c670
...
...
@@ -15,6 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Import from the Standard Library
from
__future__
import
absolute_import
from
urlparse
import
urlparse
# Import from itools
...
...
@@ -26,8 +27,8 @@ from App.Management import Tabs
from
AccessControl
import
ClassSecurityInfo
# Import from Localizer
from
LocalFiles
import
LocalDTMLFile
from
utils
import
lang_negotiator
,
_
from
.
LocalFiles
import
LocalDTMLFile
from
.
utils
import
lang_negotiator
,
_
class
LanguageManager
(
Tabs
):
...
...
product/Localizer/LocalFiles.py
View file @
0df4c670
...
...
@@ -22,6 +22,7 @@ locale attribute. Currently it only defines the classes LocalDTMLFile and
LocalPageTemplateFile, which should be used instead of DTMLFile and
PageTemplateFile.
"""
from
__future__
import
absolute_import
# Import from the Standard Library
import
os
...
...
@@ -30,7 +31,7 @@ import os
from
App.special_dtml
import
DTMLFile
# Import from Localizer
from
utils
import
DomainAware
from
.
utils
import
DomainAware
...
...
product/Localizer/Localizer.py
View file @
0df4c670
...
...
@@ -15,6 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Import from the Standard Library
from
__future__
import
absolute_import
from
urllib
import
unquote
from
contextlib
import
contextmanager
...
...
@@ -30,11 +31,11 @@ from ZPublisher.BeforeTraverse import registerBeforeTraverse, \
unregisterBeforeTraverse
,
queryBeforeTraverse
,
NameCaller
# Import Localizer modules
from
interfaces
import
ILocalizer
from
LocalFiles
import
LocalDTMLFile
from
MessageCatalog
import
MessageCatalog
,
to_unicode
from
utils
import
lang_negotiator
from
LanguageManager
import
LanguageManager
from
.
interfaces
import
ILocalizer
from
.
LocalFiles
import
LocalDTMLFile
from
.
MessageCatalog
import
MessageCatalog
,
to_unicode
from
.
utils
import
lang_negotiator
from
.
LanguageManager
import
LanguageManager
...
...
@@ -257,7 +258,7 @@ class Localizer(LanguageManager, Folder):
LOG
(
'Localizer'
,
PROBLEM
,
'Cannot change language inside a translationContext'
,
error
=
True
)
MARKER
=
[]
from
patches
import
get_request
# late import, as this is patched by
from
.
patches
import
get_request
# late import, as this is patched by
# unit tests
request
=
get_request
()
# Localizer always use this request internally
old_accept_language
=
request
.
get
(
'AcceptLanguage'
,
MARKER
)
...
...
product/Localizer/MessageCatalog.py
View file @
0df4c670
...
...
@@ -20,6 +20,7 @@
This module provides the MessageCatalog base class, which
provides message catalogs for the web.
"""
from
__future__
import
absolute_import
# Import from the Standard Library
from
base64
import
encodestring
,
decodestring
...
...
@@ -49,10 +50,10 @@ from zLOG import LOG, INFO
from
zExceptions
import
Forbidden
# Import from Localizer
from
interfaces
import
IMessageCatalog
from
LanguageManager
import
LanguageManager
from
LocalFiles
import
LocalDTMLFile
from
utils
import
charsets
,
lang_negotiator
,
_
from
.
interfaces
import
IMessageCatalog
from
.
LanguageManager
import
LanguageManager
from
.
LocalFiles
import
LocalDTMLFile
from
.
utils
import
charsets
,
lang_negotiator
,
_
...
...
product/Localizer/__init__.py
View file @
0df4c670
...
...
@@ -15,6 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Import from the Standard Library
from
__future__
import
absolute_import
import
os.path
# Import from Zope
...
...
@@ -22,10 +23,10 @@ from App.ImageFile import ImageFile
from
DocumentTemplate.DT_String
import
String
# Import from Localizer
from
patches
import
get_request
import
Localizer
,
MessageCatalog
from
LocalFiles
import
LocalDTMLFile
from
GettextTag
import
GettextTag
from
.
patches
import
get_request
from
.
import
Localizer
,
MessageCatalog
from
.
LocalFiles
import
LocalDTMLFile
from
.
GettextTag
import
GettextTag
...
...
product/Localizer/itools/i18n/__init__.py
View file @
0df4c670
...
...
@@ -16,12 +16,13 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Import from itools
from
accept
import
AcceptLanguageType
,
get_accept
,
select_language
from
accept
import
init_language_selector
from
base
import
has_language
,
get_languages
,
get_language_name
from
fuzzy
import
get_distance
,
get_similarity
,
is_similar
,
get_most_similar
from
locale_
import
format_date
,
format_time
,
format_datetime
from
oracle
import
guess_language
,
is_asian_character
,
is_punctuation
from
__future__
import
absolute_import
from
.accept
import
AcceptLanguageType
,
get_accept
,
select_language
from
.accept
import
init_language_selector
from
.base
import
has_language
,
get_languages
,
get_language_name
from
.fuzzy
import
get_distance
,
get_similarity
,
is_similar
,
get_most_similar
from
.locale_
import
format_date
,
format_time
,
format_datetime
from
.oracle
import
guess_language
,
is_asian_character
,
is_punctuation
...
...
product/Localizer/itools/i18n/locale_.py
View file @
0df4c670
...
...
@@ -17,9 +17,10 @@
"""
Output dates and times in locale format.
"""
from
__future__
import
absolute_import
# Import from itools
from
accept
import
get_accept
from
.
accept
import
get_accept
formats
=
{
...
...
product/Localizer/utils.py
View file @
0df4c670
...
...
@@ -15,6 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Import from itools
from
__future__
import
absolute_import
from
.itools.utils
import
get_abspath
from
.itools.i18n
import
AcceptLanguageType
,
init_language_selector
...
...
@@ -22,7 +23,7 @@ from .itools.i18n import AcceptLanguageType, init_language_selector
from
App.Common
import
package_home
# Import from Localizer
from
patches
import
get_request
from
.
patches
import
get_request
# Package home
...
...
product/MailTemplates/BaseMailTemplate.py
View file @
0df4c670
from
__future__
import
absolute_import
# Copyright (c) 2005-2006 Simplistix Ltd
#
# This Software is released under the MIT License:
...
...
@@ -16,7 +17,7 @@ from email.Utils import make_msgid, formataddr, getaddresses
from
App.class_init
import
default__class_init__
as
InitializeClass
from
App.Common
import
package_home
from
MTMultipart
import
MTMultipart
from
.
MTMultipart
import
MTMultipart
from
Products.PageTemplates.ZopePageTemplate
import
ZopePageTemplate
from
Products.PageTemplates.PageTemplateFile
import
PageTemplateFile
...
...
product/MailTemplates/FSMailTemplate.py
View file @
0df4c670
from
__future__
import
absolute_import
# Copyright (c) 2005-2006 Simplistix Ltd
#
# This Software is released under the MIT License:
...
...
@@ -11,8 +12,8 @@ from Products.CMFCore.FSPageTemplate import FSPageTemplate
from
Products.CMFCore.DirectoryView
import
registerFileExtension
from
Products.CMFCore.DirectoryView
import
registerMetaType
from
BaseMailTemplate
import
BaseMailTemplate
from
MailTemplate
import
MailTemplate
from
.
BaseMailTemplate
import
BaseMailTemplate
from
.
MailTemplate
import
MailTemplate
class
FSMailTemplate
(
BaseMailTemplate
,
FSPageTemplate
):
"Wrapper for Mail Template"
...
...
product/MailTemplates/MailTemplate.py
View file @
0df4c670
from
__future__
import
absolute_import
# Copyright (c) 2005-2006 Simplistix Ltd
#
# This Software is released under the MIT License:
...
...
@@ -14,7 +15,7 @@ from Products.PageTemplates.ZopePageTemplate import ZopePageTemplate
from
Products.PageTemplates.PageTemplate
import
PageTemplate
from
Products.PageTemplates.PageTemplateFile
import
PageTemplateFile
from
BaseMailTemplate
import
BaseMailTemplate
from
.
BaseMailTemplate
import
BaseMailTemplate
class
MailTemplate
(
BaseMailTemplate
,
ZopePageTemplate
):
"A ZPT-like template for sending mails"
...
...
product/MailTemplates/__init__.py
View file @
0df4c670
from
__future__
import
absolute_import
# Copyright (c) 2005-2006 Simplistix Ltd
#
# This Software is released under the MIT License:
...
...
@@ -6,7 +7,7 @@
from
AccessControl
import
allow_module
,
allow_class
from
Products.PageTemplates.PageTemplateFile
import
PageTemplateFile
from
MailTemplate
import
MailTemplate
from
.
MailTemplate
import
MailTemplate
from
types
import
ClassType
from
urllib
import
quote
...
...
@@ -15,7 +16,7 @@ try:
except
ImportError
:
pass
else
:
import
FSMailTemplate
from
.
import
FSMailTemplate
import
Products.CMFCore.utils
Products
.
CMFCore
.
utils
.
registerIcon
(
FSMailTemplate
.
FSMailTemplate
,
'www/fsmt.gif'
,
globals
())
...
...
product/MailTemplates/tests/test_FSMailTemplate.py
View file @
0df4c670
from
__future__
import
absolute_import
# Copyright (c) 2005-2006 Simplistix Ltd
#
# This Software is released under the MIT License:
...
...
@@ -9,7 +10,7 @@ from AccessControl.SecurityManagement import newSecurityManager
from
AccessControl.SecurityManagement
import
noSecurityManager
from
AccessControl.User
import
system
as
SystemUser
,
SimpleUser
from
OFS.Folder
import
Folder
from
test_MailTemplate
import
DummyMailHost
,
Zope
,
get_transaction
from
.
test_MailTemplate
import
DummyMailHost
,
Zope
,
get_transaction
from
Testing.makerequest
import
makerequest
from
unittest
import
TestCase
,
TestSuite
,
makeSuite
,
main
...
...
product/PortalTransforms/tests/test_graph.py
View file @
0df4c670
from
__future__
import
absolute_import
from
Products.Archetypes.tests.atsitetestcase
import
ATSiteTestCase
from
utils
import
input_file_path
from
.
utils
import
input_file_path
FILE_PATH
=
input_file_path
(
"demo1.pdf"
)
class
TestGraph
(
ATSiteTestCase
):
...
...
product/PortalTransforms/tests/test_transforms.py
View file @
0df4c670
from
__future__
import
absolute_import
import
os
import
logging
from
Products.Archetypes.tests.atsitetestcase
import
ATSiteTestCase
from
Products.CMFCore.utils
import
getToolByName
from
utils
import
input_file_path
,
output_file_path
,
normalize_html
,
\
from
.
utils
import
input_file_path
,
output_file_path
,
normalize_html
,
\
load
,
matching_inputs
from
Products.PortalTransforms.data
import
datastream
from
Products.PortalTransforms.interfaces
import
IDataStream
...
...
product/PortalTransforms/transforms/office_uno.py
View file @
0df4c670
from
__future__
import
absolute_import
import
re
,
os
,
tempfile
import
uno
from
.
import
uno
import
unohelper
from
com.sun.star.beans
import
PropertyValue
...
...
product/PortalTransforms/transforms/word_to_html.py
View file @
0df4c670
from
__future__
import
absolute_import
from
Products.PortalTransforms.interfaces
import
ITransform
from
zope.interface
import
implements
...
...
@@ -14,19 +15,19 @@ import os
if
os
.
name
==
'posix'
:
try
:
if
ENABLE_UNO
:
from
office_uno
import
document
from
.
office_uno
import
document
else
:
raise
except
:
from
office_wvware
import
document
from
.
office_wvware
import
document
else
:
try
:
if
ENABLE_UNO
:
from
office_uno
import
document
from
.
office_uno
import
document
else
:
raise
except
:
from
office_com
import
document
from
.
office_com
import
document
import
os.path
...
...
product/ZLDAPConnection/ZLDAP.py
View file @
0df4c670
...
...
@@ -6,6 +6,7 @@
Now by Jeffrey P Shell <jeffrey@Digicool.com>.
"""
from
__future__
import
absolute_import
__version__
=
"$Revision: 1.11 $"
[
11
:
-
2
]
...
...
@@ -16,8 +17,8 @@ from App.Dialogs import MessageDialog
from
Persistence
import
Persistent
import
ldap
,
urllib
import
LDCAccessors
from
Entry
import
ZopeEntry
,
GenericEntry
,
TransactionalEntry
from
.
import
LDCAccessors
from
.
Entry
import
ZopeEntry
,
GenericEntry
,
TransactionalEntry
ConnectionError
=
'ZLDAP Connection Error'
manage_addZLDAPConnectionForm
=
HTMLFile
(
'add'
,
globals
())
...
...
product/ZLDAPConnection/__init__.py
View file @
0df4c670
"""LDAP Server Connection Package """
from
__future__
import
absolute_import
import
ZLDAP
,
Entry
from
.
import
ZLDAP
,
Entry
__version__
=
ZLDAP
.
__version__
...
...
product/ZLDAPMethods/LM.py
View file @
0df4c670
...
...
@@ -2,6 +2,7 @@
# core of LDAP Filter Methods.
from
__future__
import
absolute_import
__version__
=
"$Revision: 1.10 $"
[
11
:
-
2
]
try
:
...
...
@@ -26,7 +27,7 @@ import sys
from
zLOG
import
LOG
,
INFO
from
ldif
import
LDIFRecordList
,
is_dn
,
valid_changetype_dict
,
CHANGE_TYPES
import
ldifvar
from
.
import
ldifvar
from
DocumentTemplate.security
import
RestrictedDTML
try
:
from
AccessControl
import
getSecurityManager
...
...
product/ZLDAPMethods/__init__.py
View file @
0df4c670
"""LDAP Filter Methods Package """
from
__future__
import
absolute_import
import
LM
from
.
import
LM
def
initialize
(
context
):
...
...
product/ZSQLCatalog/ColumnMap.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2008-2009 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -30,7 +31,7 @@
import
re
import
itertools
from
zLOG
import
LOG
,
WARNING
,
INFO
from
interfaces.column_map
import
IColumnMap
from
.
interfaces.column_map
import
IColumnMap
from
zope.interface.verify
import
verifyClass
from
zope.interface
import
implements
from
Products.ZSQLCatalog.interfaces.column_map
import
IColumnMap
...
...
product/ZSQLCatalog/Operator/ComparisonOperator.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002-2006 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -28,7 +29,7 @@
#
##############################################################################
from
OperatorBase
import
OperatorBase
from
.
OperatorBase
import
OperatorBase
from
Products.ZSQLCatalog.SQLExpression
import
SQLExpression
from
Products.ZSQLCatalog.interfaces.operator
import
IOperator
from
zope.interface.verify
import
verifyClass
...
...
product/ZSQLCatalog/Operator/__init__.py
View file @
0df4c670
from
ComparisonOperator
import
operator_dict
from
__future__
import
absolute_import
from
.ComparisonOperator
import
operator_dict
product/ZSQLCatalog/Query/AutoQuery.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002-2006 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -28,7 +29,7 @@
#
##############################################################################
from
Query
import
Query
from
.
Query
import
Query
from
zLOG
import
LOG
from
Products.ZSQLCatalog.interfaces.query
import
IQuery
from
zope.interface.verify
import
verifyClass
...
...
product/ZSQLCatalog/Query/ComplexQuery.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002-2006 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -28,7 +29,7 @@
#
##############################################################################
from
Query
import
Query
from
.
Query
import
Query
from
Products.ZSQLCatalog.SQLExpression
import
SQLExpression
from
Products.ZSQLCatalog.interfaces.query
import
IQuery
from
zope.interface.verify
import
verifyClass
...
...
product/ZSQLCatalog/Query/RelatedQuery.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002-2006 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -28,7 +29,7 @@
#
##############################################################################
from
Query
import
Query
from
.
Query
import
Query
from
Products.ZSQLCatalog.SQLExpression
import
SQLExpression
from
Products.ZSQLCatalog.interfaces.query
import
IQuery
from
zope.interface.verify
import
verifyClass
...
...
product/ZSQLCatalog/Query/SQLQuery.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002-2006 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -28,7 +29,7 @@
#
##############################################################################
from
Query
import
Query
from
.
Query
import
Query
from
Products.ZSQLCatalog.SQLExpression
import
SQLExpression
from
Products.ZSQLCatalog.interfaces.query
import
IQuery
from
zope.interface.verify
import
verifyClass
...
...
product/ZSQLCatalog/Query/SimpleQuery.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002-2006 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -28,7 +29,7 @@
#
##############################################################################
from
Query
import
Query
from
.
Query
import
Query
from
Products.ZSQLCatalog.interfaces.query
import
IQuery
from
zope.interface.verify
import
verifyClass
from
Products.ZSQLCatalog.SQLCatalog
import
list_type_list
...
...
product/ZSQLCatalog/SQLCatalog.py
View file @
0df4c670
...
...
@@ -13,6 +13,7 @@
#
##############################################################################
from
__future__
import
absolute_import
from
Persistence
import
Persistent
,
PersistentMapping
import
Acquisition
import
ExtensionClass
...
...
@@ -55,11 +56,11 @@ from xml.sax.saxutils import escape, quoteattr
import
os
from
hashlib
import
md5
from
interfaces.query_catalog
import
ISearchKeyCatalog
from
.
interfaces.query_catalog
import
ISearchKeyCatalog
from
zope.interface.verify
import
verifyClass
from
zope.interface
import
implements
from
SearchText
import
isAdvancedSearchText
,
dequote
from
.
SearchText
import
isAdvancedSearchText
,
dequote
# Try to import ActiveObject in order to make SQLCatalog active
try
:
...
...
@@ -2529,10 +2530,10 @@ InitializeClass(Catalog)
class
CatalogError
(
Exception
):
pass
from
Query.Query
import
Query
as
BaseQuery
from
Query.SimpleQuery
import
SimpleQuery
from
Query.ComplexQuery
import
ComplexQuery
from
Query.AutoQuery
import
AutoQuery
from
.
Query.Query
import
Query
as
BaseQuery
from
.
Query.SimpleQuery
import
SimpleQuery
from
.
Query.ComplexQuery
import
ComplexQuery
from
.
Query.AutoQuery
import
AutoQuery
Query
=
AutoQuery
def
NegatedQuery
(
query
):
...
...
@@ -2547,7 +2548,7 @@ def OrQuery(*args):
allow_class
(
SimpleQuery
)
allow_class
(
ComplexQuery
)
import
SearchKey
from
.
import
SearchKey
SEARCH_KEY_INSTANCE_POOL
=
{}
SEARCH_KEY_CLASS_CACHE
=
{}
...
...
@@ -2657,10 +2658,10 @@ class AdvancedSearchKeyWrapperForScriptableKey(SearchKey.DefaultKey.DefaultKey):
)
InitializeClass
(
AdvancedSearchKeyWrapperForScriptableKey
)
from
Operator
import
operator_dict
from
.
Operator
import
operator_dict
def
getComparisonOperatorInstance
(
operator
):
return
operator_dict
[
operator
]
from
Query.EntireQuery
import
EntireQuery
from
.
Query.EntireQuery
import
EntireQuery
verifyClass
(
ISearchKeyCatalog
,
Catalog
)
product/ZSQLCatalog/SQLExpression.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2008-2009 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -28,7 +29,7 @@
##############################################################################
import
warnings
from
interfaces.sql_expression
import
ISQLExpression
from
.
interfaces.sql_expression
import
ISQLExpression
from
zope.interface.verify
import
verifyClass
from
zope.interface
import
implements
from
types
import
NoneType
...
...
product/ZSQLCatalog/SearchKey/DateTimeKey.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002-2006 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -28,7 +29,7 @@
#
##############################################################################
from
SearchKey
import
SearchKey
from
.
SearchKey
import
SearchKey
from
Products.ZSQLCatalog.Query.SimpleQuery
import
SimpleQuery
from
Products.ZSQLCatalog.Query.ComplexQuery
import
ComplexQuery
from
zLOG
import
LOG
...
...
product/ZSQLCatalog/SearchKey/DefaultKey.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002-2006 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -28,7 +29,7 @@
#
##############################################################################
from
SearchKey
import
SearchKey
from
.
SearchKey
import
SearchKey
from
Products.ZSQLCatalog.SearchText
import
parse
from
Products.ZSQLCatalog.interfaces.search_key
import
ISearchKey
from
zope.interface.verify
import
verifyClass
...
...
product/ZSQLCatalog/SearchKey/FullTextKey.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002-2006 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -28,7 +29,7 @@
#
##############################################################################
from
DefaultKey
import
DefaultKey
from
.
DefaultKey
import
DefaultKey
from
Products.ZSQLCatalog.Query.SimpleQuery
import
SimpleQuery
from
Products.ZSQLCatalog.interfaces.search_key
import
ISearchKey
from
Products.ZSQLCatalog.SearchText
import
dequote
...
...
product/ZSQLCatalog/SearchKey/KeywordKey.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002-2006 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -28,7 +29,7 @@
#
##############################################################################
from
SearchKey
import
SearchKey
from
.
SearchKey
import
SearchKey
from
Products.ZSQLCatalog.SearchText
import
parse
from
Products.ZSQLCatalog.interfaces.search_key
import
ISearchKey
from
zope.interface.verify
import
verifyClass
...
...
product/ZSQLCatalog/SearchKey/MroongaBooleanFullTextKey.py
View file @
0df4c670
...
...
@@ -26,7 +26,8 @@
#
##############################################################################
from
MroongaFullTextKey
import
MroongaFullTextKey
from
__future__
import
absolute_import
from
.MroongaFullTextKey
import
MroongaFullTextKey
from
Products.ZSQLCatalog.interfaces.search_key
import
ISearchKey
from
zope.interface.verify
import
verifyClass
...
...
product/ZSQLCatalog/SearchKey/MroongaFullTextKey.py
View file @
0df4c670
...
...
@@ -26,7 +26,8 @@
#
##############################################################################
from
DefaultKey
import
DefaultKey
from
__future__
import
absolute_import
from
.DefaultKey
import
DefaultKey
from
Products.ZSQLCatalog.Query.SimpleQuery
import
SimpleQuery
from
Products.ZSQLCatalog.interfaces.search_key
import
ISearchKey
from
Products.ZSQLCatalog.SearchText
import
dequote
...
...
product/ZSQLCatalog/SearchKey/RawKey.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002-2006 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -28,7 +29,7 @@
#
##############################################################################
from
SearchKey
import
SearchKey
from
.
SearchKey
import
SearchKey
from
Products.ZSQLCatalog.interfaces.search_key
import
ISearchKey
from
zope.interface.verify
import
verifyClass
...
...
product/ZSQLCatalog/SearchKey/RelatedKey.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2002-2006 Nexedi SARL and Contributors. All Rights Reserved.
...
...
@@ -28,7 +29,7 @@
#
##############################################################################
from
SearchKey
import
SearchKey
from
.
SearchKey
import
SearchKey
from
Products.ZSQLCatalog.Query.Query
import
Query
from
Products.ZSQLCatalog.Query.RelatedQuery
import
RelatedQuery
from
Products.ZSQLCatalog.Query.SQLQuery
import
SQLQuery
...
...
product/ZSQLCatalog/SearchKey/SphinxSEFullTextKey.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2010 Nexedi SA and Contributors. All Rights Reserved.
...
...
@@ -25,7 +26,7 @@
#
##############################################################################
from
SearchKey
import
SearchKey
from
.
SearchKey
import
SearchKey
from
Products.ZSQLCatalog.Query.SimpleQuery
import
SimpleQuery
from
Products.ZSQLCatalog.SearchText
import
parse
from
Products.ZSQLCatalog.interfaces.search_key
import
ISearchKey
...
...
product/ZSQLCatalog/SearchText/AdvancedSearchTextDetector.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2008-2009 Nexedi SA and Contributors. All Rights Reserved.
...
...
@@ -26,7 +27,7 @@
#
##############################################################################
from
lexer
import
lexer
,
update_docstrings
from
.
lexer
import
lexer
,
update_docstrings
# TODO: remove the special OPERATOR case: it does not work when there are both a valid and an invalid operator
...
...
product/ZSQLCatalog/SearchText/AdvancedSearchTextParser.py
View file @
0df4c670
from
__future__
import
absolute_import
##############################################################################
#
# Copyright (c) 2008-2009 Nexedi SA and Contributors. All Rights Reserved.
...
...
@@ -26,7 +27,7 @@
#
##############################################################################
from
lexer
import
lexer
,
update_docstrings
from
.
lexer
import
lexer
,
update_docstrings
try
:
from
Products.ZSQLCatalog.interfaces.abstract_syntax_node
import
INode
,
IValueNode
,
ILogicalNode
,
IColumnNode
from
zope.interface.verify
import
verifyClass
...
...
product/ZSQLCatalog/SearchText/SearchTextParser.py
View file @
0df4c670
...
...
@@ -28,10 +28,11 @@
#
##############################################################################
from
__future__
import
absolute_import
import
threading
from
AdvancedSearchTextDetector
import
AdvancedSearchTextDetector
from
AdvancedSearchTextParser
import
AdvancedSearchTextParser
from
lexer
import
ParserOrLexerError
from
.
AdvancedSearchTextDetector
import
AdvancedSearchTextDetector
from
.
AdvancedSearchTextParser
import
AdvancedSearchTextParser
from
.
lexer
import
ParserOrLexerError
if
__name__
==
'__main__'
:
DEBUG
=
1
...
...
product/ZSQLCatalog/SearchText/__init__.py
View file @
0df4c670
from
SearchTextParser
import
parse
,
isAdvancedSearchText
from
__future__
import
absolute_import
from
.SearchTextParser
import
parse
,
isAdvancedSearchText
def
dequote
(
value
):
if
isinstance
(
value
,
basestring
)
and
len
(
value
)
>=
2
and
\
...
...
product/ZSQLCatalog/ZSQLCatalog.py
View file @
0df4c670
...
...
@@ -12,6 +12,7 @@
#
##############################################################################
"""ZCatalog product"""
from
__future__
import
absolute_import
from
App.special_dtml
import
DTMLFile
from
App.Dialogs
import
MessageDialog
...
...
@@ -26,7 +27,7 @@ from DocumentTemplate.DT_Util import Eval
from
AccessControl.Permission
import
name_trans
from
AccessControl.Permissions
import
import_export_objects
,
\
manage_zcatalog_entries
from
SQLCatalog
import
CatalogError
from
.
SQLCatalog
import
CatalogError
from
AccessControl
import
ClassSecurityInfo
from
DocumentTemplate.security
import
RestrictedDTML
from
Products.CMFCore.utils
import
getToolByName
...
...
product/ZSQLCatalog/__init__.py
View file @
0df4c670
...
...
@@ -12,8 +12,9 @@
##############################################################################
"""ZCatalog product"""
from
__future__
import
absolute_import
import
ZSQLCatalog
,
SQLCatalog
from
.
import
ZSQLCatalog
,
SQLCatalog
def
initialize
(
context
):
context
.
registerClass
(
...
...
@@ -40,5 +41,5 @@ ModuleSecurityInfo('Products.ZSQLCatalog.SQLCatalog').declarePublic(
'ComplexQuery'
,
'Query'
,
'NegatedQuery'
,
'AndQuery'
,
'OrQuery'
,
'BaseQuery'
)
from
Query
import
Query
,
SimpleQuery
from
SearchKey
import
SearchKey
from
.
Query
import
Query
,
SimpleQuery
from
.
SearchKey
import
SearchKey
product/Zelenium/__init__.py
View file @
0df4c670
...
...
@@ -4,9 +4,10 @@ This product uses the Selenium javascript to run browser-driven tests.
$Id$
"""
from
__future__
import
absolute_import
import
zuite
import
permissions
from
.
import
zuite
from
.
import
permissions
zelenium_globals
=
globals
()
...
...
product/Zelenium/zuite.py
View file @
0df4c670
...
...
@@ -4,6 +4,7 @@ Zuite instances are collections of Zelenium test cases.
$Id$
"""
from
__future__
import
absolute_import
import
glob
import
logging
import
os
...
...
@@ -27,9 +28,9 @@ from OFS.Image import File
from
OFS.OrderedFolder
import
OrderedFolder
from
Products.PageTemplates.PageTemplateFile
import
PageTemplateFile
from
interfaces
import
IZuite
from
permissions
import
ManageSeleniumTestCases
from
permissions
import
View
from
.
interfaces
import
IZuite
from
.
permissions
import
ManageSeleniumTestCases
from
.
permissions
import
View
logger
=
logging
.
getLogger
(
'event.Zelenium'
)
...
...
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