From: Radek Czajka Date: Wed, 13 Feb 2013 14:52:09 +0000 (+0100) Subject: material needs format X-Git-Url: https://git.mdrn.pl/edumed.git/commitdiff_plain/594930a0723314b1d76f5128638ed42ec31c9493?hp=6689f764dd433858bfa1d10555cec97590a1d3bb material needs format --- diff --git a/catalogue/publish.py b/catalogue/publish.py index bf215a6..87f4d90 100755 --- a/catalogue/publish.py +++ b/catalogue/publish.py @@ -6,13 +6,8 @@ from .models import Lesson, Attachment 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 - 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,