mainapp/utils.py
def formatmonth(self, theyear, themonth, withyear=True):
        """
        Return a formatted month as a table.
        """

        bookings = Booking.objects.filter(book_date__month=themonth)

        v = []
        a = v.append
        a('<table border="0" cellpadding="0" cellspacing="0" class="month">')
        a('\n')
        a(self.formatmonthname(theyear, themonth, withyear=withyear))
        a('\n')
        a(self.formatweekheader())
        a('\n')
        for week in self.monthdays2calendar(theyear, themonth):
            a(self.formatweek(week, bookings, theyear, themonth))
            a('\n')
        a('</table>')
        a('\n')
        return ''.join(v)

        Return a formatted month as a table.
        
Return a formatted month as a table.
Return a formatted month as a table .
def formatmonth(self, theyear, themonth, withyear=True):
        bookings = Booking.objects.filter(book_date__month=themonth)
        v = []
        a = v.append
        a('<table border="0" cellpadding="0" cellspacing="0" class="month">')
        a('\n')
        a(self.formatmonthname(theyear, themonth, withyear=withyear))
        a('\n')
        a(self.formatweekheader())
        a('\n')
        for week in self.monthdays2calendar(theyear, themonth):
            a(self.formatweek(week, bookings, theyear, themonth))
            a('\n')
        a('</table>')
        a('\n')
        return ''.join(v)
def formatmonth ( self , theyear , themonth , withyear = True ) : bookings = Booking . objects . filter ( book_date__month = themonth ) v = [ ] a = v . append a ( '<table border="0" cellpadding="0" cellspacing="0" class="month">' ) a ( '\n' ) a ( self . formatmonthname ( theyear , themonth , withyear = withyear ) ) a ( '\n' ) a ( self . formatweekheader ( ) ) a ( '\n' ) for week in self . monthdays2calendar ( theyear , themonth ) : a ( self . formatweek ( week , bookings , theyear , themonth ) ) a ( '\n' ) a ( '</table>' ) a ( '\n' ) return '' . join ( v )
Return a formatted month as a table.
Return a formatted month as a table .
"""
        Return a formatted month as a table.
        """
self
theyear
themonth
withyear