Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
a9fcfcef
Commit
a9fcfcef
authored
Jul 03, 2011
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move Persistence patch into startup code
parent
e1276ff7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
28 deletions
+13
-28
src/App/PersistentExtra.py
src/App/PersistentExtra.py
+0
-26
src/Zope2/App/startup.py
src/Zope2/App/startup.py
+13
-2
No files found.
src/App/PersistentExtra.py
deleted
100644 → 0
View file @
e1276ff7
##############################################################################
#
# Copyright (c) 2002 Zope Foundation and Contributors.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
##############################################################################
_patched
=
False
def
patchPersistent
():
global
_patched
if
_patched
:
return
_patched
=
True
from
Persistence
import
Persistent
from
AccessControl.class_init
import
InitializeClass
Persistent
.
__class_init__
=
InitializeClass
src/Zope2/App/startup.py
View file @
a9fcfcef
...
...
@@ -44,6 +44,7 @@ from zope.processlifetime import DatabaseOpenedWithRoot
app
=
None
startup_time
=
asctime
()
_patched
=
False
def
load_zcml
():
...
...
@@ -56,10 +57,20 @@ def load_zcml():
configure_vocabulary_registry
()
def
patch_persistent
():
global
_patched
if
_patched
:
return
_patched
=
True
from
Persistence
import
Persistent
from
AccessControl.class_init
import
InitializeClass
Persistent
.
__class_init__
=
InitializeClass
def
startup
():
from
App.PersistentExtra
import
patchPersistent
import
Globals
# to set / fetch data
patch
P
ersistent
()
patch
_p
ersistent
()
global
app
...
...
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