oops, fix generating conditional is_pdf and is_ppt in raw PDFView class
authorSeth Woodworth <seth@sethish.com>
Mon, 1 Jul 2013 18:06:07 +0000 (14:06 -0400)
committerSeth Woodworth <seth@sethish.com>
Mon, 1 Jul 2013 18:06:07 +0000 (14:06 -0400)
karmaworld/apps/notes/views.py

index e9bffc1578db60b8794c1b0d011032f6be4bb118..d4037e6068dc2b6f1ee713221306c031846ccfd7 100644 (file)
@@ -125,10 +125,10 @@ class PDFView(DetailView):
         """ Generate a path to the pdf file associated with this note
             by generating a path to the MEDIA_URL by hand """
 
-        if is_ppt:
+        if is_ppt(self):
             kwargs['pdf_path'] = "{0}{1}".format(settings.MEDIA_URL,
                 os.path.basename(self.object.pdf_file.name))
-        elif is_pdf:
+        elif is_pdf(self):
             kwargs['pdf_path'] = "{0}{1}".format(settings.MEDIA_URL,
                 os.path.basename(self.object.note_file.name))