Commit ff780050 authored by Patrick Kimber's avatar Patrick Kimber

Move 'MyReport' (PDF) to the 'report' app

parent 6a068a94
......@@ -23,6 +23,7 @@ from booking.models import (
from report.pdf import MyReport
def grouper(iterable, n, fillvalue=None):
......@@ -176,29 +177,6 @@ class HtmlCalendar(object):
return result
class MyReport(object):
def __init__(self):
# Use the sample style sheet.
style_sheet = getSampleStyleSheet()
self.body = style_sheet["BodyText"]
self.head_1 = style_sheet["Heading1"]
self.head_2 = style_sheet["Heading2"]
self.GRID_LINE_WIDTH = 0.1
def _bold(self, text):
return self._para('<b>{}</b>'.format(text))
def _head_1(self, text):
return platypus.Paragraph(text, self.head_1)
def _head_2(self, text):
return platypus.Paragraph(text, self.head_2)
def _para(self, text):
return platypus.Paragraph(text, self.body)
class PdfCalendar(MyReport):
def __init__(self):
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment