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
c9bdd052
Commit
c9bdd052
authored
Nov 06, 2001
by
matt@zope.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added data.fs.in patch utility program
parent
48137705
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
lib/python/Products/TemporaryFolder/patchfs.py
lib/python/Products/TemporaryFolder/patchfs.py
+36
-0
No files found.
lib/python/Products/TemporaryFolder/patchfs.py
0 → 100644
View file @
c9bdd052
# Utility program to patch Data.fs.in to include a temporary folder, browser
# id manager, and session data manager
import
ZODB
import
Globals
from
ZODB
import
FileStorage
,
DB
import
Products.Sessions.BrowserIdManager
import
Products.Sessions.SessionDataManager
import
Products.TemporaryFolder.TemporaryFolder
import
os.path
import
sys
fs
=
FileStorage
.
FileStorage
(
os
.
path
.
join
(
Globals
.
data_dir
,
'Data.fs.in'
))
db
=
DB
(
fs
)
conn
=
db
.
open
()
root
=
conn
.
root
()
app
=
root
[
'Application'
]
print
"Patching Data.fs.in"
tf
=
Products
.
TemporaryFolder
.
TemporaryFolder
.
MountedTemporaryFolder
(
'temp_folder'
,
'Temporary Folder'
)
bid
=
Products
.
Sessions
.
BrowserIdManager
.
BrowserIdManager
(
'browser_id_manager'
,
'Browser Id Manager'
)
sdm
=
Products
.
Sessions
.
SessionDataManager
.
SessionDataManager
(
'session_data_manager'
,
title
=
'Session Data Manager'
,
path
=
'/temp_folder/transient_container'
,
automatic
=
0
)
app
.
_setObject
(
'temp_folder'
,
tf
)
app
.
_setObject
(
'browser_id_manager'
,
bid
)
app
.
_setObject
(
'session_data_manager'
,
sdm
)
app
.
_p_changed
=
1
get_transaction
().
commit
()
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