[Checkins] SVN: grokapps/gbe work around a limitation in multi-app setups
Michael Haubenwallner
michael at d2m.at
Tue Oct 7 06:40:48 EDT 2008
Log message for revision 91842:
work around a limitation in multi-app setups
Changed:
U grokapps/gbepastebin/src/gbepastebin/browser.py
U grokapps/gbepastebin/src/gbepastebin/browser_templates/entry.pt
U grokapps/gbepastebin/src/gbepastebin/browser_templates/index.pt
U grokapps/gbepastebin/src/gbepastebin/browser_templates/manage.pt
D grokapps/gbepastebin/src/gbepastebin/browser_templates/master.pt
A grokapps/gbepastebin/src/gbepastebin/browser_templates/pastebinmaster.pt
U grokapps/gbewiki/src/gbewiki/interface.py
U grokapps/gbewiki/src/gbewiki/interface_templates/login.pt
D grokapps/gbewiki/src/gbewiki/interface_templates/master.pt
A grokapps/gbewiki/src/gbewiki/interface_templates/wikimaster.pt
U grokapps/gbewiki/src/gbewiki/page.py
U grokapps/gbewiki/src/gbewiki/page_templates/edit.pt
U grokapps/gbewiki/src/gbewiki/page_templates/index.pt
-=-
Modified: grokapps/gbepastebin/src/gbepastebin/browser.py
===================================================================
--- grokapps/gbepastebin/src/gbepastebin/browser.py 2008-10-07 10:24:17 UTC (rev 91841)
+++ grokapps/gbepastebin/src/gbepastebin/browser.py 2008-10-07 10:40:47 UTC (rev 91842)
@@ -17,7 +17,7 @@
COOKIE_AUTHOR='gbepastebin.last_author'
COOKIE_LANGUAGE='gbepastebin.last_language'
-class Master(grok.View):
+class PastebinMaster(grok.View):
grok.context(Interface)
def version(self):
@@ -33,7 +33,7 @@
message.prepare(source)
yield message
-class Index(Master):
+class Index(PastebinMaster):
grok.context(Application)
def preferred_author(self):
@@ -84,7 +84,7 @@
def render(self):
return self.redirect(self.url(grok.getSite()))
-class Manage(Master):
+class Manage(PastebinMaster):
grok.context(Application)
grok.require('gbepastebin.manage')
@@ -101,7 +101,7 @@
else:
self.flash('<b>Problem:</b> could not delete all Pastes requested')
-class Entry(Master):
+class Entry(PastebinMaster):
grok.context(PasteBase)
grok.name('index')
Modified: grokapps/gbepastebin/src/gbepastebin/browser_templates/entry.pt
===================================================================
--- grokapps/gbepastebin/src/gbepastebin/browser_templates/entry.pt 2008-10-07 10:24:17 UTC (rev 91841)
+++ grokapps/gbepastebin/src/gbepastebin/browser_templates/entry.pt 2008-10-07 10:40:47 UTC (rev 91842)
@@ -1,4 +1,4 @@
-<metal:block use-macro="context/@@master/macros/master">
+<metal:block use-macro="context/@@pastebinmaster/macros/master">
<metal:block fill-slot="left">
<tal:block define="format view/format">
Modified: grokapps/gbepastebin/src/gbepastebin/browser_templates/index.pt
===================================================================
--- grokapps/gbepastebin/src/gbepastebin/browser_templates/index.pt 2008-10-07 10:24:17 UTC (rev 91841)
+++ grokapps/gbepastebin/src/gbepastebin/browser_templates/index.pt 2008-10-07 10:40:47 UTC (rev 91842)
@@ -1,4 +1,4 @@
-<metal:block use-macro="context/@@master/macros/master">
+<metal:block use-macro="context/@@pastebinmaster/macros/master">
<metal:block fill-slot="left">
<form tal:attributes="action string:@@paste" method="POST">
<input type="hidden" name="form.submitted"/>
Modified: grokapps/gbepastebin/src/gbepastebin/browser_templates/manage.pt
===================================================================
--- grokapps/gbepastebin/src/gbepastebin/browser_templates/manage.pt 2008-10-07 10:24:17 UTC (rev 91841)
+++ grokapps/gbepastebin/src/gbepastebin/browser_templates/manage.pt 2008-10-07 10:40:47 UTC (rev 91842)
@@ -1,4 +1,4 @@
-<metal:block use-macro="context/@@master/macros/master">
+<metal:block use-macro="context/@@pastebinmaster/macros/master">
<metal:block fill-slot="left">
<tal:block define="pastes context/list_pastes" condition="pastes">
<fieldset>
Deleted: grokapps/gbepastebin/src/gbepastebin/browser_templates/master.pt
===================================================================
--- grokapps/gbepastebin/src/gbepastebin/browser_templates/master.pt 2008-10-07 10:24:17 UTC (rev 91841)
+++ grokapps/gbepastebin/src/gbepastebin/browser_templates/master.pt 2008-10-07 10:40:47 UTC (rev 91842)
@@ -1,42 +0,0 @@
-<metal:block define-macro="master">
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:tal="http://xml.zope.org/namespaces/tal">
- <head>
- <title>gbepastebin</title>
- <link rel="stylesheet" type="text/css"
- tal:attributes="href static/styles.css" />
- </head>
- <body>
- <div id="main">
-
- <div class="header">Grok-By-Example Pastebin v<tal:block replace="view/version" /> by <a
- href="http://d2m.at" >d2m</a>
- <br />
- <small>based on ClueGun by <a
- href="http://repoze.org" >Agendaless Consulting</a> based on ClueBin by <a
- href="http://www.serverzen.com">ServerZen Software</a></small>
- </div>
- <div tal:condition="view/messages|nothing">
- <div class="message" tal:repeat="message view/messages"
- tal:content="structure message/message">Error message</div>
- <br />
- </div>
-
- <div class="userinfo">
-<metal:block define-slot="userinfo" />
- </div>
-
- <div class="left">
-<metal:block define-slot="left" />
- </div>
-
- <div class="right">
-<metal:block define-slot="right" />
- </div>
-
- <div class="clear" />
-
- </div>
- </body>
-</html>
-</metal:block>
\ No newline at end of file
Copied: grokapps/gbepastebin/src/gbepastebin/browser_templates/pastebinmaster.pt (from rev 91758, grokapps/gbepastebin/src/gbepastebin/browser_templates/master.pt)
===================================================================
--- grokapps/gbepastebin/src/gbepastebin/browser_templates/pastebinmaster.pt (rev 0)
+++ grokapps/gbepastebin/src/gbepastebin/browser_templates/pastebinmaster.pt 2008-10-07 10:40:47 UTC (rev 91842)
@@ -0,0 +1,42 @@
+<metal:block define-macro="master">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:tal="http://xml.zope.org/namespaces/tal">
+ <head>
+ <title>gbepastebin</title>
+ <link rel="stylesheet" type="text/css"
+ tal:attributes="href static/styles.css" />
+ </head>
+ <body>
+ <div id="main">
+
+ <div class="header">Grok-By-Example Pastebin v<tal:block replace="view/version" /> by <a
+ href="http://d2m.at" >d2m</a>
+ <br />
+ <small>based on ClueGun by <a
+ href="http://repoze.org" >Agendaless Consulting</a> based on ClueBin by <a
+ href="http://www.serverzen.com">ServerZen Software</a></small>
+ </div>
+ <div tal:condition="view/messages|nothing">
+ <div class="message" tal:repeat="message view/messages"
+ tal:content="structure message/message">Error message</div>
+ <br />
+ </div>
+
+ <div class="userinfo">
+<metal:block define-slot="userinfo" />
+ </div>
+
+ <div class="left">
+<metal:block define-slot="left" />
+ </div>
+
+ <div class="right">
+<metal:block define-slot="right" />
+ </div>
+
+ <div class="clear" />
+
+ </div>
+ </body>
+</html>
+</metal:block>
\ No newline at end of file
Modified: grokapps/gbewiki/src/gbewiki/interface.py
===================================================================
--- grokapps/gbewiki/src/gbewiki/interface.py 2008-10-07 10:24:17 UTC (rev 91841)
+++ grokapps/gbewiki/src/gbewiki/interface.py 2008-10-07 10:40:47 UTC (rev 91842)
@@ -12,7 +12,7 @@
grok.context(Interface)
-class Master(grok.View):
+class WikiMaster(grok.View):
"""The master page template macro """
def logged_in(self):
@@ -80,7 +80,7 @@
""" % self.application_url()
return out
-class Login(Master):
+class Login(WikiMaster):
"""Login form and handler."""
def update(self, login_submit=None):
if login_submit is not None:
Modified: grokapps/gbewiki/src/gbewiki/interface_templates/login.pt
===================================================================
--- grokapps/gbewiki/src/gbewiki/interface_templates/login.pt 2008-10-07 10:24:17 UTC (rev 91841)
+++ grokapps/gbewiki/src/gbewiki/interface_templates/login.pt 2008-10-07 10:40:47 UTC (rev 91842)
@@ -1,4 +1,4 @@
-<html metal:use-macro="context/@@master/macros/page">
+<html metal:use-macro="context/@@wikimaster/macros/page">
<body>
<div metal:fill-slot="body">
<h1>Login</h1>
Deleted: grokapps/gbewiki/src/gbewiki/interface_templates/master.pt
===================================================================
--- grokapps/gbewiki/src/gbewiki/interface_templates/master.pt 2008-10-07 10:24:17 UTC (rev 91841)
+++ grokapps/gbewiki/src/gbewiki/interface_templates/master.pt 2008-10-07 10:40:47 UTC (rev 91842)
@@ -1,58 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:tal="http://xml.zope.org/namespaces/tal"
- xmlns:metal="http://xml.zope.org/namespaces/metal"
- metal:define-macro="page">
- <head>
- <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
- <title metal:define-slot="title" tal:content="python:context.__parent__.__name__"></title>
- <link tal:attributes="href static/style.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" tal:content="view/js_newpage"></script>
- <metal:block define-slot="head" />
- </head>
- <body>
- <div id="header">
- <div class="top">
- <div class="login">
- <span class="item nickname" tal:content="view/user|nothing"/>
- <tal:block tal:condition="not:view/isManager">
- <tal:block tal:condition="view/user">
- |
- <span class="item"><a tal:attributes="href python:view.url('@@logout')">Sign out</a></span>
- </tal:block>
- <tal:block tal:condition="not:view/user">
- <span class="item"><a tal:attributes="href python:view.url('@@login')">Sign in</a></span>
- </tal:block>
- </tal:block>
- </div>
- <div class="title">
- <a href="/" tal:attributes="href python:view.application_url()"><img
- tal:attributes="src static/logo.png" alt="Google Wiki"/></a>
- </div>
- </div>
- <div class="messages">
- <tal:block tal:repeat="message view/messages">
- <div class="message" tal:condition="repeat/message/start"
- tal:content="structure message/message" />
- </tal:block>
- </div>
- <div class="bottom">
- <div class="attribution">
- <tal:block condition="view/exists|nothing">
- Edited on <span tal:replace="python:view.dc().modified.strftime('%a, %b %d, %Y \t %I:%M %p')" /> by
- <tal:block tal:condition="view/editor" tal:replace="view/editor" />
- </tal:block>
- </div>
- <div class="buttons">
- <span class="item">
- <input type="button"
- value="New Page" onclick="NewPage()"/>
- </span><metal:block define-slot="buttons" />
- </div>
- <div style="clear: both"></div>
- </div>
- </div>
- <div id="body"><metal:block define-slot="body" /></div>
- <div id="footer"></div>
- </body>
-</html>
\ No newline at end of file
Copied: grokapps/gbewiki/src/gbewiki/interface_templates/wikimaster.pt (from rev 91758, grokapps/gbewiki/src/gbewiki/interface_templates/master.pt)
===================================================================
--- grokapps/gbewiki/src/gbewiki/interface_templates/wikimaster.pt (rev 0)
+++ grokapps/gbewiki/src/gbewiki/interface_templates/wikimaster.pt 2008-10-07 10:40:47 UTC (rev 91842)
@@ -0,0 +1,58 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:tal="http://xml.zope.org/namespaces/tal"
+ xmlns:metal="http://xml.zope.org/namespaces/metal"
+ metal:define-macro="page">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
+ <title metal:define-slot="title" tal:content="python:context.__parent__.__name__"></title>
+ <link tal:attributes="href static/style.css" rel="stylesheet" type="text/css"/>
+ <script type="text/javascript" tal:content="view/js_newpage"></script>
+ <metal:block define-slot="head" />
+ </head>
+ <body>
+ <div id="header">
+ <div class="top">
+ <div class="login">
+ <span class="item nickname" tal:content="view/user|nothing"/>
+ <tal:block tal:condition="not:view/isManager">
+ <tal:block tal:condition="view/user">
+ |
+ <span class="item"><a tal:attributes="href python:view.url('@@logout')">Sign out</a></span>
+ </tal:block>
+ <tal:block tal:condition="not:view/user">
+ <span class="item"><a tal:attributes="href python:view.url('@@login')">Sign in</a></span>
+ </tal:block>
+ </tal:block>
+ </div>
+ <div class="title">
+ <a href="/" tal:attributes="href python:view.application_url()"><img
+ tal:attributes="src static/logo.png" alt="Google Wiki"/></a>
+ </div>
+ </div>
+ <div class="messages">
+ <tal:block tal:repeat="message view/messages">
+ <div class="message" tal:condition="repeat/message/start"
+ tal:content="structure message/message" />
+ </tal:block>
+ </div>
+ <div class="bottom">
+ <div class="attribution">
+ <tal:block condition="view/exists|nothing">
+ Edited on <span tal:replace="python:view.dc().modified.strftime('%a, %b %d, %Y \t %I:%M %p')" /> by
+ <tal:block tal:condition="view/editor" tal:replace="view/editor" />
+ </tal:block>
+ </div>
+ <div class="buttons">
+ <span class="item">
+ <input type="button"
+ value="New Page" onclick="NewPage()"/>
+ </span><metal:block define-slot="buttons" />
+ </div>
+ <div style="clear: both"></div>
+ </div>
+ </div>
+ <div id="body"><metal:block define-slot="body" /></div>
+ <div id="footer"></div>
+ </body>
+</html>
\ No newline at end of file
Modified: grokapps/gbewiki/src/gbewiki/page.py
===================================================================
--- grokapps/gbewiki/src/gbewiki/page.py 2008-10-07 10:24:17 UTC (rev 91841)
+++ grokapps/gbewiki/src/gbewiki/page.py 2008-10-07 10:40:47 UTC (rev 91842)
@@ -1,7 +1,7 @@
import grok
from zope.component import getAdapter
-from gbewiki.interface import Master
+from gbewiki.interface import WikiMaster
from gbewiki.utils import ITransform
default_page_name = 'MainPage'
@@ -16,7 +16,7 @@
self.content = '<h1>%s</h1>' % name
self.editor=None
-class Index(Master):
+class Index(WikiMaster):
def wikified_content(self):
self.content = self.context.content
@@ -50,7 +50,7 @@
save the page to '
'store it to the database' % self.context.__name__)
-class Edit(Master):
+class Edit(WikiMaster):
grok.require('wiki.EditPage')
def update(self):
Modified: grokapps/gbewiki/src/gbewiki/page_templates/edit.pt
===================================================================
--- grokapps/gbewiki/src/gbewiki/page_templates/edit.pt 2008-10-07 10:24:17 UTC (rev 91841)
+++ grokapps/gbewiki/src/gbewiki/page_templates/edit.pt 2008-10-07 10:40:47 UTC (rev 91842)
@@ -1,4 +1,4 @@
-<html metal:use-macro="context/@@master/macros/page">
+<html metal:use-macro="context/@@wikimaster/macros/page">
<title metal:fill-slot="title">
<span tal:replace="python:context.__parent__.__name__" /> -
<span tal:replace="python:context.__name__" />
Modified: grokapps/gbewiki/src/gbewiki/page_templates/index.pt
===================================================================
--- grokapps/gbewiki/src/gbewiki/page_templates/index.pt 2008-10-07 10:24:17 UTC (rev 91841)
+++ grokapps/gbewiki/src/gbewiki/page_templates/index.pt 2008-10-07 10:40:47 UTC (rev 91842)
@@ -1,4 +1,4 @@
-<html metal:use-macro="context/@@master/macros/page">
+<html metal:use-macro="context/@@wikimaster/macros/page">
<head>
<title metal:fill-slot="title">
<span tal:replace="python:context.__parent__.__name__" /> -
More information about the Checkins
mailing list