source: waeup_product/trunk/Extensions/install.py @ 160

Last change on this file since 160 was 160, checked in by joachim, 19 years ago

=fixed virtual hosting

  • Property svn:keywords set to Id
File size: 25.9 KB
RevLine 
[60]1#-*- mode: python; mode: fold -*-
[72]2# $Id: install.py 160 2005-11-06 15:07:41Z joachim $
[139]3from Products.ExternalMethod.ExternalMethod import ExternalMethod
[19]4from Products.CPSInstaller.CPSInstaller import CPSInstaller
[139]5from Products.CMFCore.CMFCorePermissions import View, ModifyPortalContent,AccessContentsInformation
[84]6from Products.WAeUP.WAeUPPermissions import UniversityManage, StudentManage,FacultyManage,\
7                                            DepartmentManage,CourseManage
[19]8try:
[23]9  from Products.CPSSubscriptions.permissions import CanNotifyContent
[19]10  CPSSubscriptions = True
11except ImportError:
12  CPSSubscriptions = False
13try:
[23]14  from Products.CPSForum.CPSForumPermissions import ForumManageComments
[19]15  CPSForum = True
16except ImportError:
17  CPSForum = False
18
[60]19from Products.WAeUP.Students import addStudentsFolder
20
[139]21SRPP_ID = "demouni"
22SRPP_TITLE = "Demo University"
23
[19]24class WAeUPInstaller(CPSInstaller):
25    """
26    WAeUP Installer
27    """
28    product_name = "WAeUP"
29
30    def install(self,portal):
31        "install"
[139]32        log = []
33        prlog = log.append
[143]34
[139]35        def pr(msg, prlog=prlog):
36            prlog('%s<br>' % msg)
[19]37
38        product_name = self.product_name
[139]39        pr("Starting %(product_name)s install" % vars() )
[119]40
[87]41        # Roles and Permissions ###(
[84]42        #
43        self.verifyRoles((
44            # A role that can manage the University.
45            'UniversityManager',
46            # A role that can manage the StudentsRecords.
47            'StudentManager',
48            # A role that can manage a Faculty.
49            'FacultyManager',
50            # A role that can manage a department.
51            'DepartmentManager',
52            # A role that can manage a Course.
53            'CourseManager',
[87]54            # The Student Role
55            'Student',
[84]56        ))
57        waeup_perms = {
58            UniversityManage:
[119]59                ('Manager', 'SectionManager','UniversityManager',
[84]60                 ),
61            StudentManage:
[119]62                ('Manager', 'SectionManager','UniversityManager', 'StudentManager'
[84]63                 ),
64            FacultyManage:
[119]65                ('Manager', 'SectionManager','UniversityManager', 'FacultyManager'
[84]66                 ),
67            DepartmentManage:
[119]68                ('Manager', 'SectionManager','UniversityManager', 'DepartmentManager'
[84]69                 ),
70            CourseManage:
[119]71                ('Manager', 'SectionManager','UniversityManager', 'CourseManager'
[84]72                 ),
73        }
74        self.setupPortalPermissions(waeup_perms)
[139]75        ###)
[84]76
[139]77        # external methods ###(
78        #
79        ext_methods = ( { 'id': 'waeup_migrate',
80                          'title': 'WAeUP (migrate from an earlier version)',
81                          'script': 'WAeUP.install',
82                          'method': 'migrate',
83                          'protected': 1,
84                        },
85                      )
86        portal_objectIds = portal.objectIds()
87        for meth in ext_methods:
88            method = meth['id']
89            if method in portal_objectIds:
90                portal._delObject(method)
91            pr('Creating %s External Method' % method)
92            ext_method = ExternalMethod(method,
93                                        meth['title'],
94                                        meth['script'],
95                                        meth['method'])
96            portal._setObject(method, ext_method)
97            if method in portal_objectIds:
98                manage_perms = portal[method].manage_permission
99                if meth['protected']:
100                    pr("Protecting %s" % method)
101                    manage_perms(View, roles=['Manager'], acquire=0)
102                    manage_perms(AccessContentsInformation, roles=['Manager'], acquire=0)
103                else:
104                    manage_perms(View, roles=['Manager'], acquire=1)
105        ###)
[87]106
[19]107        ##########################################
[119]108        # Actions
[19]109        ##########################################
[103]110        waeup_ptypes = "'University','StudentsFolder','Student','Jamb','Faculty','Department','Course'"
[119]111        waeup_ptypes += ",'AccoFolder','Accommodation','StudentPersonal','AcademicsFolder'"
[152]112        waeup_ptypes += ",'StudyLevel','Semester','CourseTicket'"
[84]113        if CPSSubscriptions: ###(
[119]114
[19]115            ptypes = "('Portal', 'CPSMailAccess Message', 'CPSMailAccess Box', 'CPSMailAccess Folder',"\
[103]116                     + waeup_ptypes + ")"
[19]117            condition = "object.portal_type not in %s" % ptypes
[119]118
[19]119            action = {'id' : 'notify_content',
120                      'name' : 'action_notify_content',
121                      'action' : 'string:${object_url}/content_notify_email_form',
122                      'condition' : 'python:%s' % condition,
123                      'permission' :  (CanNotifyContent,),
124                      'category' : 'object',
125                      }
126            self.deleteActions({'portal_subscriptions': ['notify_content',]})
127            self.verifyAction('portal_subscriptions', **action)
128        if CPSForum:
[103]129            condition = "object.portal_type not in (%s)" % waeup_ptypes
[119]130
[19]131            action = {'id' : 'activate_comments',
132                      'name': 'action_activate_comments',
133                      'action': 'string:${object/absolute_url}/set_comment_mode?mode=1',
134                      'condition' : 'python:%s' % condition,
135                      'permission': (ForumManageComments,),
136                      'category' : 'object',
137                      }
[57]138            self.deleteActions({'portal_subscriptions': ['activate_comments',]})
[19]139            self.verifyAction('portal_subscriptions', **action)
[57]140            # now portal_discussion
141            self.deleteActions({'portal_discussion': ['comment',
142                                                      'activate_comments',
143                                                      'deactivate_comments',
144                                                      'manage_comments']})
145            action = {'id' : 'comment',
146                      'name': 'action_comment',
147                      'action': "string:${object/absolute_url}/post_comment",
148                      'condition' : "python:getattr(object.getContent(), 'allow_discussion' , None) and object.hasCommentAction()",
149                      'permission': (View,),
150                      'category' : 'object',
151                      }
152            self.verifyAction('portal_discussion', **action)
153            action = {'id' : 'activate_comments',
154                      'name': 'action_activate_comments',
155                      'action': "string:${object/absolute_url}/set_comment_mode?mode=1",
156                      'condition' : "python:getattr(object.getTypeInfo(),'cps_proxy_type','') in ('document', 'folderishdocument') and getattr(object.getContent(), 'allow_discussion' , None) == 1",
157                      'permission': (ForumManageComments,),
158                      'category' : 'object',
159                      }
160            self.verifyAction('portal_discussion', **action)
161            action = {'id' : 'deactivate_comments',
162                      'name': 'action_deactivate_comments',
163                      'action': "string:${object/absolute_url}/set_comment_mode?mode=0",
164                      'condition' : "python:getattr(object.getTypeInfo(),'cps_proxy_type','') in ('document', 'folderishdocument') and getattr(object.getContent(), 'allow_discussion' , None) == 1",
165                      'permission': (ForumManageComments,),
166                      'category' : 'object',
167                      }
168            self.verifyAction('portal_discussion', **action)
169            action = {'id' : 'manage_comments',
170                      'name': 'action_manage_comments',
171                      'action': "string:${object/absolute_url}/manage_comment",
172                      'condition' : "python:getattr(object.getTypeInfo(),'cps_proxy_type','') in ('document', 'folderishdocument') and getattr(object.getContent(), 'allow_discussion' , None) == 1",
173                      'permission': (ForumManageComments,),
174                      'category' : 'object',
175                      }
176            self.verifyAction('portal_discussion', **action)
[119]177
[84]178###)
179
[19]180        ##########################################
[100]181        # main_tab actions ###(
[19]182        ##########################################
[143]183        path = "/sections/%(SRPP_ID)s" % globals()
[20]184        actions = ( { 'tool'      : 'portal_actions',
[100]185                        'id'        : 'student_administration',
[119]186                        'name'      : 'Students',
[160]187                        'action'    : "python: portal.portal_url.getUrlFromRpath('sections/demouni/students')",
[143]188                        #'action'    : 'string:$portal_url%(path)s/students' % vars(),
[20]189                        'permission': (View, ),
[100]190                        'category'  : 'main_tabs',
[20]191                        'visible'   : 1,
192                      },
[100]193                      { 'tool'      : 'portal_actions',
[113]194                        'id'        : 'Academics',
195                        'name'      : 'Academics',
[160]196                        'action'    : "python: portal.portal_url.getUrlFromRpath('sections/demouni/academics')",
197                        #'action'    : 'string:${portal_url}/academics',
[100]198                        'permission': (View ),
199                        'category'  : 'main_tabs',
200                        'visible'   : 1,
201                      },
[103]202                      { 'tool'      : 'portal_actions',
203                        'id'        : 'accomodation',
204                        'name'      : 'Accommodation',
[160]205                        'action'    : "python: portal.portal_url.getUrlFromRpath('sections/demouni/accommodation')",
206                        #'action'    : 'string:${portal_url}/accommodation',
[115]207                        'permissions': (View),
208                        #'permissions': (ModifyPortalContent,UniversityManage,StudentManage),
[103]209                        'category'  : 'main_tabs',
210                        'visible'   : 1,
211                      },
[49]212##                      { 'tool'      : 'portal_actions',
[100]213##                        'id'        : 'add_jamb',
214##                        'name'      : 'Add Student JAMB',
215##                        'action'    : 'string:${object/absolute_url}/create_jamb',
216##                        'permission': (),
217##                        'condition' : 'python: member and here.portal_type in ("StudentsFolder",) and "StudentManager" in member.getGroups()',
[49]218##                        'category'  : 'student',
219##                        'visible'   : 1,
220##                      },
[100]221##                      { 'tool'      : 'portal_actions',
222##                        'id'        : 'add_faculty',
223##                        'name'      : 'Add New Faculty',
224##                        'action'    : 'string:${object/absolute_url}/addFaculty',
225##                        'permission': (),
226##                        'condition' : 'python: member and here.portal_type in ("University",) and "StudentManager" in member.getGroups()',
227##                        'category'  : 'student',
228##                        'visible'   : 1,
229##                      },
230##                      { 'tool'      : 'portal_actions',
231##                        'id'        : 'add_department',
232##                        'name'      : 'Add New Department',
233##                        'action'    : 'string:${object/absolute_url}/addDepartment',
234##                        'permission': (),
235##                        'condition' : 'python: member and here.portal_type in ("Faculty",) and "StudentManager" in member.getGroups()',
236##                        'category'  : 'student',
237##                        'visible'   : 1,
238##                      },
239##                      { 'tool'      : 'portal_actions',
240##                        'id'        : 'add_course',
241##                        'name'      : 'Add New Course',
242##                        'action'    : 'string:${object/absolute_url}/addCourse',
243##                        'permission': (),
244##                        'condition' : 'python: member and here.portal_type in ("Department",) and "StudentManager" in member.getGroups()',
245##                        'category'  : 'student',
246##                        'visible'   : 1,
247##                      },
248##                      { 'tool'      : 'portal_actions',
249##                        'id'        : 'add_personal',
250##                        'name'      : 'Add personal Data',
251##                        'action'    : 'string:${object/absolute_url}/create_personal_form',
252##                        'permission': (),
253##                        'condition' : 'python: 0 and member and not here.portal_type in ("Jamb","StudentsFolder") and not "StudentManager" in member.getGroups()',
254##                        'category'  : 'student',
255##                        'visible'   : 1,
256##                      },
257##                      { 'tool'      : 'portal_actions',
258##                        'id'        : 'edit_jamb',
259##                        'name'      : 'Edit Jamb Data',
260##                        'action'    : 'cpsdocument_edit_form',
261##                        'permission': ( ),
262##                        'condition' : 'python: member and here.portal_type in ("Student",) and "StudentManager" in member.getGroups()',
263##                        'category'  : 'student',
264##                        'visible'   : 1,
265##                      },
[20]266                    )
267        self.verifyActions(actions)
268        ##########################################
[60]269###)
270
[119]271        # skins
[20]272        ##########################################
[139]273        pr("Verifying %(product_name)s skinss" % vars())
[19]274        wskins = { 'waeup_default' : 'Products/WAeUP/skins/waeup_default',
[84]275                   'waeup_faculty' : 'Products/WAeUP/skins/waeup_faculty',
[19]276                   'waeup_student' : 'Products/WAeUP/skins/waeup_student',
277                 }
278        self.verifySkins(wskins)
279        self.resetSkinCache()
[119]280
[139]281        # Themes ###(
282        #
283        # Importing portal themes
284##        theme_container = getattr(portal, 'portal_themes')
285##            # the first theme in each category is the default theme.
286##        themes_list = {'WAeUP':    ({'id': 'waeup_plain_theme',
287##                                  'file': 'waeup_plain_theme.zexp',
288##                                  },
289##                                  {'id': 'waeup_management_theme',
290##                                   'file': 'waeup_management_theme.zexp',
291##                                  },
292##                                 ),
293##                      }
294##
[143]295##
[139]296##        theme_ids = theme_container.objectIds()
297##        theme_container.manage_delObjects(theme_ids)
298##        target_themes = themes_list[Target]
299##        for theme in target_themes:
300##            pr(" Importing %s theme" % theme['id'])
301##            zexppath = os.path.join(zexpdir, theme['file'])
302##            try:
303##                theme_container._importObjectFromFile(zexppath)
304##            except:
305##                pr("    Could not import theme  %s" % theme['id'])
306##
307##        # set the first theme in the list as the default one.
308##        theme_container.setDefaultTheme(target_themes[0]['id'])
309###)
[143]310
311
[19]312        ##########################################
[20]313        # portal types
[19]314        ##########################################
315        dtypes = portal.getWAeUPTypes()
316        self.verifyFlexibleTypes(dtypes)
[45]317        self.allowContentTypes('University', ('Workspace','Section',))
[19]318        ##########################################
[20]319        # Schemas
[19]320        ##########################################
[139]321        pr("Verifying %(product_name)s schemas" % vars())
[19]322        self.verifySchemas(portal.getWAeUPSchemas())
323        ##########################################
[20]324        # widgets
[19]325        ##########################################
[139]326        pr("Verifying %(product_name)s widgets" % vars())
[20]327        self.verifyWidgets(portal.getWAeUPWidgets())
328        ##########################################
329        # layouts
330        ##########################################
[139]331        pr("Verifying %(product_name)s layouts" % vars())
[19]332        self.verifyLayouts(portal.getWAeUPLayouts())
333        ##########################################
[20]334        # Vocabularies
[19]335        ##########################################
[139]336        pr("Verifying %(product_name)s vocabularies" % vars())
[19]337        self.verifyVocabularies(portal.getWAeUPVocabularies())
[60]338        ##########################################
339        # Groups
340        ##########################################
[119]341
[19]342        self.installCustomWorkflows()
343        self.verifyWorkflowAssociation()
[119]344
[139]345        pr("End of specific %(product_name)s install" % vars())
346        #return '\n'.join(log)
[19]347        self.finalize()
348
[119]349
[152]350    def verifyPortlets(self, portlets=(), object=None): ###(
351        """Verify the existence of given portet in the object's portlet
352        container. If not found, a portlet is instantiated.
353        Existing portlets are not affected.
354
355        'portlets' is a tuple with the dictionaries given by the export tab
356        as entries.
357        The default object is the portal itself.
358
359        return the list a new portlet ids.
360        """
361
362        if object is None:
363            object = self.portal
364
365        self.log('Verifying portlets on %s' % object.absolute_url(relative=1))
366
367        portlet_container = self.getPortletContainer(object, create=1)
368
369        ttool = self.getTool('portal_types')
370
371        returned = []
372        for new_portlet in portlets:
373            existing_portlets = portlet_container.listPortlets()
374            updated = 0
375
376            # Check if the portlet needs an update
377            identifier = new_portlet.get('identifier')
378            if identifier:
379                for portlet in existing_portlets:
380                    if identifier == portlet.identifier:
381                        self.log(" Update of portlet: %s" % portlet)
382                        portlet.edit(**new_portlet)
383                        portlet_id = portlet.getId()
384                        updated = 1
385                        continue
386            slot = new_portlet.get('slot')
387            if slot:
388                for portlet in existing_portlets:
389                    if slot == portlet.slot:
390                        self.log(" Update of portlet: %s" % portlet)
391                        portlet.edit(**new_portlet)
392                        portlet_id = portlet.getId()
393                        updated = 1
394                        continue
395
396            if not updated:
397                self.log("   Creation of portlet: %s" % new_portlet)
398                portlet_id = self.portal.portal_cpsportlets.createPortlet(
399                    ptype_id=new_portlet['type'],
400                    context=object,
401                    **new_portlet)
402            if portlet_id not in returned:
403                returned.append(portlet_id)
404        return returned
405
406###)
407
408    def installCustomWorkflows(self): ###(
[19]409        """Installs custom workflows
410        """
411        from Products.WAeUP.Workflows.WAeUPWorkflow import \
412             waeupWorkflowsInstall
413
414        waeupWorkflowsInstall(self.context)
415
[152]416###)
[19]417
[152]418    def verifyWorkflowAssociation(self): ###(
[19]419        """Verify workflow association
420        """
[119]421        ws_chains = {
[19]422                      'Student': 'waeup_workspace_wf',
423                      'Jamb': 'waeup_workspace_wf',
424                      }
425
[45]426        se_chains = { 'University': 'waeup_section_wf',
[113]427                      'AcademicsFolder': 'waeup_section_wf',
[152]428                      'StudentsFolder': 'waeup_student_wf',
429                      'Student': 'waeup_student_wf',
430                      'StudentPersonal': 'waeup_student_wf',
[19]431                      'Jamb': 'waeup_section_wf',
[25]432                      'ScratchCard': 'waeup_section_wf',
[68]433                      'Faculty': 'waeup_section_wf',
434                      'Department': 'waeup_section_wf',
435                      'Course': 'waeup_section_wf',
[152]436                      'StudyLevel': 'waeup_student_wf',
437                      'Semester': 'waeup_student_wf',
438                      'CourseTicket': 'waeup_student_wf',
[103]439                      'AccoFolder': 'waeup_section_wf',
440                      'Accommodation': 'waeup_section_wf',
[19]441                      }
442
443        self.verifyLocalWorkflowChains(self.portal['workspaces'],
444                                       ws_chains,
445                                       destructive=1)
446        self.verifyLocalWorkflowChains(self.portal['sections'],
447                                       se_chains,
448                                       destructive=1)
449
[152]450###)
[19]451
[152]452
453def install(self): ###(
[19]454    installer = WAeUPInstaller(self)
455    installer.install(self)
[60]456    dirtool = getattr(self,'portal_directories')
457    groups = dirtool.groups
[96]458    for delEntry in ('StudentManager',):
459        if delEntry in groups.listEntryIds():
[119]460            groups.deleteEntry(delEntry)
[96]461    for newEntry in ('Students',):
[60]462        if newEntry not in groups.listEntryIds():
[119]463            groups.createEntry({'group': newEntry,
464                                'members': []})
[96]465    #groups.manage_setLocalGroupRoles(groupid = 'StudentManager',roles=('Manager',))
[60]466    #groups.manage_setLocalGroupRoles(groupid = 'Students',roles=('Contributor',))
467    sections = getattr(self,'sections')
[139]468    waeup = getattr(sections,SRPP_ID,None)
[60]469    if not waeup:
[139]470        sections.invokeFactory('University',SRPP_ID)
471        waeup = getattr(sections,SRPP_ID)
472        waeup.getContent().edit(mapping={'Title':SRPP_TITLE})
473        waeup.folder_localrole_add(member_ids=('group:Students',),
[60]474                                            member_role='SectionReviewer',
475                                            )
[139]476        waeup.invokeFactory('StudentsFolder','students')
477        students = getattr(waeup,'students').getContent()
478        students.edit(mapping={'Title':'Students'})
479        waeup.folder_localrole_add(member_ids=('group:Students',),
[60]480                                            member_role='SectionReviewer',
481                                            )
[139]482##        waeup.content_create(type_name='AcademicsFolder',title='academics')
[87]483##        sections.waeup.folder_localrole_add(member_ids=('group:StudentManager',),
484##                                            member_role='SectionManager',
485##                                            )
[139]486        waeup.students.manage_setLocalGroupRoles(groupid = 'Students',roles=('Contributor',))
487        waeup.invokeFactory('AcademicsFolder','academics', title='Academics')
488        academics = getattr(waeup,'academics').getContent()
489        academics.edit(mapping={'Title':'Academics'})
490        waeup.invokeFactory('AccoFolder','accommodation', title='Accommodation')
491        accommodation = getattr(waeup,'accommodation').getContent()
492        accommodation.edit(mapping={'Title':'Accommodation'})
493    if not hasattr(waeup,'academics'):
494        waeup.invokeFactory('AcademicsFolder','academics')
495        academics = getattr(waeup,'academics').getContent()
496        academics.edit(mapping={'Title':'Academics'})
497    if not hasattr(waeup,'accommodation'):
498        waeup.invokeFactory('AccoFolder','accommodation')
499        accommodation = getattr(waeup,'accommodation').getContent()
500        accommodation.edit(mapping={'Title':'Accommodation'})
501    waeup.manage_setLocalGroupRoles(groupid = 'role:Anonymous',roles=('SectionReader',))
[87]502    # portlets ###(
503    #
504    portlets = (
[100]505##              {'identifier': 'waeup_main_tabs',
506##              'type': 'Custom Portlet',
507##              'slot': 'main_tabs',
508##              'order': 0,
509##              'render_method': 'portlet_main_navigation',
510##              'Title': 'main tabs',
511##              },
[152]512              {#'identifier': 'waeup_breadcrumbs',
[87]513              'type': 'Breadcrumbs Portlet',
514              'slot': 'waeup_breadcrumbs',
[152]515              'first_item': 0,
[87]516              'display_site_root': 0,
517              'Title': 'waeup_breadcrumbs',
518              'display': 'horizontal_trail',
519              'display_hidden_folders': 0,
520              'order': 0,
521              },
[152]522              {#'identifier': 'waeup_main_tab_actions',
[100]523              'type': 'Actions Portlet',
524              'slot': 'main_tabs',
525              'order': 0,
526              'categories': ['main_tabs',],
527              'Title': 'waep_main_tab_actions',
528              },
[152]529              {#'identifier': 'waeup_object_actions',
[87]530              'type': 'Actions Portlet',
531              'slot': 'waeup_object_actions',
532              'order': 0,
[100]533              'categories': ['object',],
[87]534              'Title': 'waep_manager_actions',
535              },
[152]536              {#'identifier': 'waeup_left_top',
[87]537              'type': 'Custom Portlet',
538              'slot': 'left_top',
539              'order': 0,
540              'render_method': 'portlet_session_info',
541              'Title': 'Session Info',
542              },
543            )
[89]544    installer.verifyPortletContainer(waeup)
545    installer.verifyPortlets(portlets,waeup)
[87]546
547###)
[19]548    return installer.logResult()
[152]549    ###)
[139]550
[152]551def migrate(self): ###(
[139]552    "update data"
553    log = []
554    prlog = log.append
555
556    def pr(msg, prlog=prlog):
[140]557        prlog('%s' % msg)
[139]558
559    sections = getattr(self,'sections')
[140]560    waeup = getattr(sections,SRPP_ID,None)
[139]561    pr( "Start migrate")
562    pr("migrating courses")
[141]563    academics = getattr(waeup,'academics')
564    for fac in [getattr(academics,f.id) for f in academics.contentValues(filter={'portal_type': ('Faculty',)})]:
[139]565        pr("Faculty: %s" % fac.title_or_id())
566        for dep in [getattr(fac,d.id) for d in fac.contentValues(filter={'portal_type': ('Department',)})]:
567            pr("Department: %s" % dep.title_or_id())
568            for course in [getattr(dep,c.id) for c in dep.contentValues(filter={'portal_type': ('Course',)})]:
569                pr("Course: %s" % course.title_or_id())
570                content = course.getContent()
571                heading = getattr(content,'heading',course.id)
572                pr("heading = %(heading)s" % vars())
573                content.edit(mapping={'Title': heading})
574    pr("migrating halls")
575    for ac in [getattr(waeup,a.id) for a in waeup.contentValues(filter={'portal_type': ('AccoFolder',)})]:
576        for hall in [getattr(ac,h.id) for h in ac.contentValues(filter={'portal_type': ('Accommodation',)})]:
577            pr("Hall: %s" % hall.title_or_id())
578            content = hall.getContent()
579            heading = getattr(content,'heading',hall.id)
580            pr("heading = %(heading)s" % vars())
581            content.edit(mapping={'Title': heading})
582    return '\n'.join(log)
583               
[152]584###)
585
Note: See TracBrowser for help on using the repository browser.