Back to index

plone3  3.1.7
interfaces.py
Go to the documentation of this file.
00001 ##############################################################################
00002 #
00003 # Copyright (c) 2003-2005 Kupu Contributors. All rights reserved.
00004 #
00005 # This software is distributed under the terms of the Kupu
00006 # License. See LICENSE.txt for license text. For a list of Kupu
00007 # Contributors see CREDITS.txt.
00008 #
00009 ##############################################################################
00010 """kupu interfaces for Zope3
00011 
00012 kupu for Zope3 consist of a an IHTMLBody field and a widget (browser
00013 view) to a zope.schema field that we call HTMLBody (since it contains
00014 the contents of an HTML body). As a widget, it can make no assumptions
00015 whatsoever on the object that its field is being part of. It can only
00016 make assumptions on the field itself.
00017 
00018 We therefore also define the IKupuAsynchronousCapable, a marker
00019 interface that can be set on content objects (even on an object per
00020 object basis) and tells the Zope3 view machiner that our special Kupu
00021 views, the ones that make asynchronous editing possible, apply.
00022 
00023 $Id: interfaces.py 9879 2005-03-18 12:04:00Z yuppie $
00024 """
00025 
00026 from zope.interface import Interface
00027 from zope.schema.interfaces import IBytes
00028 from zope.schema import Bool
00029 
00030 class IHTMLBody(IBytes):
00031     """A field that stores the body of an HTML document.
00032     """
00033 
00034     html2xhtml1 = Bool(
00035         title=u"Convert browser generated HTML to well-formed XHTML1",
00036         default=False
00037         )
00038 
00039 class IKupuAsynchronousCapable(Interface):
00040     """Any content object that wants to support kupu asynchore editing
00041     will have to implement this marker interface
00042     """