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
359613a7
Commit
359613a7
authored
Sep 12, 2011
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert part of c122071 and always get a VHM back
parent
f4da03d4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
2 deletions
+23
-2
src/OFS/Application.py
src/OFS/Application.py
+11
-0
src/OFS/tests/testAppInitializer.py
src/OFS/tests/testAppInitializer.py
+9
-0
src/webdav/tests/testPUT_factory.py
src/webdav/tests/testPUT_factory.py
+3
-2
No files found.
src/OFS/Application.py
View file @
359613a7
...
@@ -213,6 +213,7 @@ class AppInitializer:
...
@@ -213,6 +213,7 @@ class AppInitializer:
self
.
install_inituser
()
self
.
install_inituser
()
self
.
install_products
()
self
.
install_products
()
self
.
install_standards
()
self
.
install_standards
()
self
.
install_virtual_hosting
()
def
install_cp_and_products
(
self
):
def
install_cp_and_products
(
self
):
global
APP_MANAGER
global
APP_MANAGER
...
@@ -266,6 +267,16 @@ class AppInitializer:
...
@@ -266,6 +267,16 @@ class AppInitializer:
transaction
.
get
().
note
(
'Migrated user folder'
)
transaction
.
get
().
note
(
'Migrated user folder'
)
transaction
.
commit
()
transaction
.
commit
()
def
install_virtual_hosting
(
self
):
app
=
self
.
getApp
()
if
'virtual_hosting'
not
in
app
:
from
Products.SiteAccess.VirtualHostMonster
\
import
VirtualHostMonster
vhm
=
VirtualHostMonster
()
vhm
.
id
=
'virtual_hosting'
vhm
.
addToContainer
(
app
)
self
.
commit
(
'Added virtual_hosting'
)
def
install_products
(
self
):
def
install_products
(
self
):
return
install_products
()
return
install_products
()
...
...
src/OFS/tests/testAppInitializer.py
View file @
359613a7
...
@@ -99,6 +99,15 @@ class TestInitialization( unittest.TestCase ):
...
@@ -99,6 +99,15 @@ class TestInitialization( unittest.TestCase ):
self
.
assertTrue
(
hasattr
(
app
,
'Control_Panel'
))
self
.
assertTrue
(
hasattr
(
app
,
'Control_Panel'
))
self
.
assertEqual
(
app
.
Control_Panel
.
meta_type
,
'Control Panel'
)
self
.
assertEqual
(
app
.
Control_Panel
.
meta_type
,
'Control Panel'
)
def
test_install_virtual_hosting
(
self
):
self
.
configure
(
good_cfg
)
i
=
self
.
getOne
()
i
.
install_virtual_hosting
()
app
=
i
.
getApp
()
self
.
assertTrue
(
'virtual_hosting'
in
app
)
self
.
assertEqual
(
app
.
virtual_hosting
.
meta_type
,
'Virtual Host Monster'
)
def
test_install_required_roles
(
self
):
def
test_install_required_roles
(
self
):
self
.
configure
(
good_cfg
)
self
.
configure
(
good_cfg
)
i
=
self
.
getOne
()
i
=
self
.
getOne
()
...
...
src/webdav/tests/testPUT_factory.py
View file @
359613a7
...
@@ -21,6 +21,7 @@ class TestPUTFactory(unittest.TestCase):
...
@@ -21,6 +21,7 @@ class TestPUTFactory(unittest.TestCase):
self
.
app
.
manage_addFolder
(
'folder'
,
''
)
self
.
app
.
manage_addFolder
(
'folder'
,
''
)
self
.
folder
=
self
.
app
.
folder
self
.
folder
=
self
.
app
.
folder
# Setup VHM
# Setup VHM
if
'virtual_hosting'
not
in
self
.
app
:
vhm
=
VirtualHostMonster
()
vhm
=
VirtualHostMonster
()
vhm
.
addToContainer
(
self
.
app
)
vhm
.
addToContainer
(
self
.
app
)
# Fake a WebDAV PUT request
# Fake a WebDAV PUT request
...
...
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