''' return self.quotedHTML(self.source) def PrincipiaSearchSource(self): ''' Support for searching - the document's contents are searched. ''' return self.source def manage_historyCompare(self, rev1, rev2, REQUEST, historyComparisonResults=''): return ZReST.inheritedAttribute('manage_historyCompare')( self, rev1, rev2, REQUEST, historyComparisonResults=html_diff(rev1.source, rev2.source)) InitializeClass(ZReST) modulesecurity.apply(globals()) # # $Log$ # Revision 1.6 2002/11/28 03:44:50 goodger # updated # # Revision 1.5 2002/11/05 05:27:56 goodger # fixed Reader name # # Revision 1.4 2002/10/18 05:10:33 goodger # Refactored names (options -> settings; etc.); updated. # # Revision 1.3 2002/08/15 05:02:41 richard # pull out the document title too
def __init__(self, **kw): self.update(kw) def __setitem__(self, key, value): key = str(key) if key.startswith('_'): raise ValueError, ('Object key %s is invalid. ' 'Keys may not begin with an underscore.' % ` key `) self.__dict__[key] = value def update(self, d): for key in d.keys(): # Ignore invalid keys, rather than raising an exception. try: skey = str(key) except: continue if skey == key and not skey.startswith('_'): self.__dict__[skey] = d[key] def __hash__(self): return id(self) def Object(**kw): return _Object(**kw) security.apply(globals())
def __getitem__(self, item): ''' Get a subitem. ''' return PathElement(self.zr, self.path + '/' + item).__of__(self) def index_html(self, REQUEST=None): ''' Actually call through to roundup to handle the request. ''' try: client = self.zr.roundup_opendb() # fake the path that roundup should use client.path = self.path # and call roundup to do something client.main() return '' except client.NotFound: raise 'NotFound', REQUEST.URL pass except: import traceback traceback.print_exc() # all other exceptions in roundup are valid raise InitializeClass(ZRoundup) modulesecurity.apply(globals()) # vim: set filetype=python ts=4 sw=4 et si
security.declarePublic('createProduct') def createProduct(context, \ zmi_skin_name='custom', \ zmi_base_skin_name='', \ subdir=None,\ fs_skin_directory='custom',\ fs_product_name='QSkinTemplate',\ erase_from_skin=0,\ doesCustomizeSlots=None,\ left_slots=[],\ right_slots=[],\ slot_forming=DEFAULT_SLOT_FORMING,\ main_column=DEFAULT_MAIN_COLUMN,\ doesExportObjects=None,\ import_policy=DEFAULT_IMPORTING_POLICY,\ exporting_objects=[], \ dump_CSS=True, \ dump_JS=True ): """ Main Skin Product creating procedure.""" makeNewProduct(context, fs_product_name, fs_skin_directory, \ zmi_skin_name, zmi_base_skin_name, subdir, \ doesCustomizeSlots, left_slots, right_slots, slot_forming, main_column, \ doesExportObjects, import_policy, \ dump_CSS, dump_JS ) dumpSkin(context, zmi_skin_name, subdir, fs_skin_directory.lower(), fs_product_name, erase_from_skin) result = exportObjects(context, doesExportObjects, exporting_objects, fs_product_name) return result security.apply(globals())