Next / Previous / Contents / Shipman's homepage

23.11. MonthCell.__dayTitle(): Render the title for one daily block

noteweb
# - - -   M o n t h C e l l . _ _ d a y T i t l e

    def __dayTitle ( self, parent, dayNotes, anchor ):
        '''Render the h2 title and define the anchor.

          [ (parent is an et.Element) and
            (dayNotes is a DayNotes instance) and
            (anchor is a valid HTML anchor string) ->
              parent  +:=  an h2 heading describing dayNotes
                           that has id=anchor ]
        '''
        #-- 1 --
        h2  =  et.SubElement ( parent, 'h2', id=anchor )
        h2.text  =  dayNotes.title()