title: Generate simple pdf report using platypus
body: <p>I am trying to generate a pdf report using reportlab in django.  I can get a simple report started by working directly with the canvas, but it looks like platypus should make things easier.  But I can't get a simple platypus report to work.</p>
  
  <pre><code>def all_comps_pdf_report(request):
  
      # Set up HttpResponse object
      response = HttpResponse(mimetype='application/pdf')
      response['Content-Disposition'] = 'attachment; filename=all_competencies.pdf'
  
      from reportlab.platypus.doctemplate import SimpleDocTemplate
      from reportlab.platypus import Paragraph
      from reportlab.lib import styles
  
      doc = SimpleDocTemplate(response)
      Elements = []
      p = Paragraph("Hello World", styles['Heading1'])
      Elements.append(p)
      doc.build(Elements)
      return response
  </code></pre>
  
  <p>I am getting an error <code>'module' object is unsubscriptable</code>, which is complaining about the line <code>p = Paragraph("Hello World", styles['Heading1'])</code>.  What am I doing wrong?</p>