project/kiwipycon/registration/pdf.py
changeset 94 87e77aa18610
parent 93 e86755df35da
child 95 f94e0cd9a862
--- a/project/kiwipycon/registration/pdf.py	Thu Apr 01 11:59:35 2010 +0530
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-import os
-
-from django.conf import settings
-from django.template.loader import render_to_string
-
-def save_invoice(user, registration, template_name):
-    content = render_to_string(template_name,
-        {'registration' : registration, 'user': user})
-    filename = '%s.html' % registration.slug
-    filepath = os.path.join(settings.USER_MEDIA_PDF, filename)
-    save_to_file(content, filepath)
-
-def save_to_pdf(content, filepath):
-    import pisa
-    pisa.CreatePDF(str(content), file(filepath, 'wb'))
-
-def save_to_file(content, filepath):
-    fout = file(filepath, 'wb')
-    fout.write(content)
-    fout.close()