Back to index

plone3  3.1.7
Functions | Variables
SampleSite.exportimport Namespace Reference

Functions

def importSite
def exportSite

Variables

string _PATH = 'siteroot'

Function Documentation

Export site configuration.

Definition at line 43 of file exportimport.py.

00043 
00044 def exportSite(context):
00045     """Export site configuration.
00046     """
00047     site = context.getSite()
00048     exporter = queryMultiAdapter((site, context), IBody)
00049     if exporter:
00050         body = exporter.body
00051         if body is not None:
00052             context.writeDataFile(_PATH+'.xml', body, exporter.mime_type)
00053 
00054     for sub in site.objectValues():
00055         if ISetupTool.providedBy(sub):
00056             continue
00057         exportObjects(sub, _PATH+'/', context)

Here is the call graph for this function:

Import site configuration.

Definition at line 28 of file exportimport.py.

00028 
00029 def importSite(context):
00030     """Import site configuration.
00031     """
00032     site = context.getSite()
00033     importer = queryMultiAdapter((site, context), IBody)
00034     if importer:
00035         body = context.readDataFile(_PATH+'.xml')
00036         if body is not None:
00037             importer.body = body
00038 
00039     for sub in site.objectValues():
00040         if ISetupTool.providedBy(sub):
00041             continue
00042         importObjects(sub, _PATH+'/', context)

Here is the call graph for this function:


Variable Documentation

string SampleSite.exportimport._PATH = 'siteroot'

Definition at line 25 of file exportimport.py.