material needs format
authorRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Wed, 13 Feb 2013 14:52:09 +0000 (15:52 +0100)
committerRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Wed, 13 Feb 2013 14:53:22 +0000 (15:53 +0100)
catalogue/publish.py

index bf215a6..87f4d90 100755 (executable)
@@ -6,13 +6,8 @@ from .models import Lesson, Attachment
 
 
 class HtmlFormat(EduModuleFormat):
 
 
 class HtmlFormat(EduModuleFormat):
-    def url_for_material(self, slug, fmt=None):
+    def url_for_material(self, slug, fmt):
         lesson_slug = self.wldoc.book_info.url.slug
         lesson_slug = self.wldoc.book_info.url.slug
-        if fmt is None:
-            # We could try and find the file by slug here, but we won't.
-            # User should supply the format explicitly anyway.
-            fmt = self.DEFAULT_MATERIAL_FORMAT
-
         try:
             # If already saved, use it.
             att = Attachment.objects.get(lesson__slug=lesson_slug,
         try:
             # If already saved, use it.
             att = Attachment.objects.get(lesson__slug=lesson_slug,