Skip to content

Commit

Permalink
Remove dependency on basicskin and rotterdam.
Browse files Browse the repository at this point in the history
  • Loading branch information
thefunny42 committed Apr 14, 2010
1 parent 07139c9 commit 6aa4143
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
2 changes: 0 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ def read(*rnames):

tests_require = [
'zope.app.authentication',
'zope.app.basicskin',
'zope.app.rotterdam',
'zope.app.zcmlfiles',
'zope.configuration',
'zope.container',
Expand Down
20 changes: 14 additions & 6 deletions src/grokcore/view/ftests/view/skindirective.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
>>> from zope.app.wsgi.testlayer import Browser
>>> browser = Browser()
>>> browser.handleErrors = False
>>> browser.open("http://localhost/++skin++Basic/manfred/@@cavedrawings")
>>> browser.open("http://localhost/++skin++Simple/manfred/@@cavedrawings")
>>> print browser.contents
<html>
<body>
<h1>Hello, world!</h1>
</body>
</html>
>>> browser.open("http://localhost/++skin++Rotterdam/manfred/@@moredrawings")
>>> browser.open("http://localhost/++skin++Grokkerdam/manfred/@@moredrawings")
>>> print browser.contents
Pretty
Expand All @@ -22,10 +22,18 @@
"""
import grokcore.view as grok
from zope.app.basicskin import IBasicSkin
from zope.app.rotterdam import rotterdam

grok.layer(IBasicSkin)

class SimpleLayer(grok.IBrowserRequest):
grok.skin('Simple')


class GrokkerdamLayer(SimpleLayer):
grok.skin('Grokkerdam')


grok.layer(SimpleLayer)


class MySkinLayer(grok.IBrowserRequest):
pass
Expand All @@ -48,7 +56,7 @@ class CaveDrawings(grok.View):
""")

class MoreDrawings(grok.View):
grok.layer(rotterdam)
grok.layer(GrokkerdamLayer)

def render(self):
return "Pretty"
Expand Down

0 comments on commit 6aa4143

Please sign in to comment.