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