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
553f0b5d
Commit
553f0b5d
authored
Aug 28, 2016
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change VHM id to `virtual_hosting` to match AppInitializer.
parent
39033d38
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
8 deletions
+15
-8
CHANGES.rst
CHANGES.rst
+2
-0
src/OFS/Application.py
src/OFS/Application.py
+11
-6
src/Products/SiteAccess/VirtualHostMonster.py
src/Products/SiteAccess/VirtualHostMonster.py
+1
-1
src/Products/SiteAccess/tests/testVirtualHostMonster.py
src/Products/SiteAccess/tests/testVirtualHostMonster.py
+1
-1
No files found.
CHANGES.rst
View file @
553f0b5d
...
...
@@ -30,6 +30,8 @@ Features Added
Restructuring
+++++++++++++
- Change VHM id to `virtual_hosting` to match AppInitializer.
- Raise BadRequest instead of returning MessageDialog.
- Remove property management ZMI screens.
...
...
src/OFS/Application.py
View file @
553f0b5d
...
...
@@ -31,8 +31,10 @@ from OFS import bbb
from
OFS.metaconfigure
import
get_packages_to_initialize
from
OFS.metaconfigure
import
package_initialized
from
OFS.userfolder
import
UserFolder
from
zExceptions
import
Redirect
as
RedirectException
,
Forbidden
from
zExceptions
import
(
Forbidden
,
Redirect
as
RedirectException
,
)
from
zope.interface
import
implements
import
Folder
...
...
@@ -270,10 +272,13 @@ class AppInitializer:
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'
)
any_vhm
=
[
obj
for
obj
in
app
.
values
()
if
isinstance
(
obj
,
VirtualHostMonster
)]
if
not
any_vhm
:
vhm
=
VirtualHostMonster
()
vhm
.
id
=
'virtual_hosting'
vhm
.
addToContainer
(
app
)
self
.
commit
(
'Added virtual_hosting'
)
def
install_products
(
self
):
return
install_products
()
...
...
src/Products/SiteAccess/VirtualHostMonster.py
View file @
553f0b5d
...
...
@@ -24,7 +24,7 @@ class VirtualHostMonster(Persistent, Item, Implicit):
meta_type
=
'Virtual Host Monster'
priority
=
25
id
=
'
VHM
'
id
=
'
virtual_hosting
'
title
=
''
lines
=
()
have_map
=
0
...
...
src/Products/SiteAccess/tests/testVirtualHostMonster.py
View file @
553f0b5d
...
...
@@ -167,7 +167,7 @@ class VHMAddingTests(unittest.TestCase):
from
Products.SiteAccess.VirtualHostMonster
import
\
manage_addVirtualHostMonster
from
zExceptions
import
BadRequest
self
.
root
.
_setObject
(
'
VHM'
,
Folder
(
'VHM
'
))
self
.
root
.
_setObject
(
'
virtual_hosting'
,
Folder
(
'virtual_hosting
'
))
vhm1
=
self
.
_makeOne
()
self
.
assertRaises
(
BadRequest
,
vhm1
.
manage_addToContainer
,
self
.
root
)
...
...
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