[z3-checkins] r22601 - z3/sqlos/branch/sqlos-zope2.8/Zope2/FiveSQLOS
jinty at codespeak.net
jinty at codespeak.net
Tue Jan 24 16:35:08 CET 2006
Author: jinty
Date: Tue Jan 24 16:35:07 2006
New Revision: 22601
Modified:
z3/sqlos/branch/sqlos-zope2.8/Zope2/FiveSQLOS/browser.py
Log:
A hacked fix to preserve the skin when using the FiveSQLOS adding view.
Modified: z3/sqlos/branch/sqlos-zope2.8/Zope2/FiveSQLOS/browser.py
==============================================================================
--- z3/sqlos/branch/sqlos-zope2.8/Zope2/FiveSQLOS/browser.py (original)
+++ z3/sqlos/branch/sqlos-zope2.8/Zope2/FiveSQLOS/browser.py Tue Jan 24 16:35:07 2006
@@ -6,9 +6,19 @@
class ContentAdding(adding.ContentAdding, Implicit):
"""Silly docstring for Zope2."""
+ def nextURL(self):
+ """See zope.app.container.interfaces.IAdding"""
+ skin = self.request.getPresentationSkin()
+ if skin is None:
+ return super(ContentAdding, self).nextURL()
+ # XXX - the skin is not prserved in Five, so we have to resort to magic
+ # SIGH! This should die when Zope2 preserves the skin.
+ return '../@@contents.html'
+
+
class UnHackedAddView(AddView):
"""Use this as the AddView if your classes don't want an id/title keyword.
-
+
Perhaps Five could provide this.
"""
More information about the z3-checkins
mailing list