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
1933dd9d
Commit
1933dd9d
authored
Jul 10, 2012
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- subclass from zope.browserpage.simpleviewclass.simple
parent
37b326ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
17 deletions
+3
-17
src/Products/Five/browser/metaconfigure.py
src/Products/Five/browser/metaconfigure.py
+3
-17
No files found.
src/Products/Five/browser/metaconfigure.py
View file @
1933dd9d
...
...
@@ -24,15 +24,14 @@ from zope.component import queryMultiAdapter
from
zope.component.interface
import
provideInterface
from
zope.component.zcml
import
handler
from
zope.configuration.exceptions
import
ConfigurationError
from
zope.interface
import
implements
from
zope.interface
import
Interface
from
zope.publisher.interfaces
import
NotFound
from
zope.publisher.interfaces.browser
import
IBrowserPublisher
from
zope.publisher.interfaces.browser
import
IBrowserRequest
from
zope.publisher.interfaces.browser
import
IDefaultBrowserLayer
from
zope.security.zcml
import
Permission
import
zope.browserpage.metaconfigure
import
zope.browserpage.simpleviewclass
from
zope.browserpage.metaconfigure
import
_handle_allowed_attributes
from
zope.browserpage.metaconfigure
import
_handle_allowed_interface
from
zope.browserpage.metaconfigure
import
_handle_for
...
...
@@ -446,27 +445,14 @@ class simple(BrowserView, zope.browserpage.metaconfigure.simple):
return
getattr
(
self
,
self
.
__page_attribute__
)
class
ViewMixinForTemplates
(
BrowserView
):
# Cloned from zope.app.pagetemplate.simpleviewclass.simple
implements
(
IBrowserPublisher
)
def
browserDefault
(
self
,
request
):
return
self
,
()
def
publishTraverse
(
self
,
request
,
name
):
if
name
==
'index.html'
:
return
self
.
index
raise
NotFound
(
self
,
name
,
request
)
class
ViewMixinForTemplates
(
BrowserView
,
zope
.
browserpage
.
simpleviewclass
.
simple
):
def
__getitem__
(
self
,
name
):
if
name
==
'macros'
:
return
self
.
index
.
macros
return
self
.
index
.
macros
[
name
]
def
__call__
(
self
,
*
args
,
**
kw
):
return
self
.
index
(
*
args
,
**
kw
)
# Original version: zope.browserpage.simpleviewclass.SimpleViewClass
def
SimpleViewClass
(
src
,
offering
=
None
,
used_for
=
None
,
bases
=
(),
name
=
u''
):
...
...
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