clean unused widget "LdtParseVideoDuration"
authorrougeronj
Mon, 14 Jan 2013 13:27:29 +0100
changeset 1060 71090f44e6c1
parent 1058 84c3d1247863
child 1061 92e3a410e192
clean unused widget "LdtParseVideoDuration"
src/ldt/ldt/forms/widgets.py
--- a/src/ldt/ldt/forms/widgets.py	Wed Jan 09 15:32:52 2013 +0100
+++ b/src/ldt/ldt/forms/widgets.py	Mon Jan 14 13:27:29 2013 +0100
@@ -18,22 +18,4 @@
     
     def format_output(self, rendered_widgets):
         return mark_safe(u'<div class="ldtdatetime"><div class="ldtdate"><div class="ldtdatetitle">%s</div> <div class="ldtdatefield">%s</div></div><div class="ldttime"><div class="ldttimetitle">%s</div> <div class="ldttimefield">%s</div></div></div>' % \
-            (_('Date'), rendered_widgets[0], _('Time'), rendered_widgets[1]))
-
-
-class LdtParseVideoDuration(TimeInput):
-    """
-    A widget allowing to enter the duration format (eg: XhMM, XXhMM, HH:MM:SS)
-    """
-
-    def value_from_datadict(self, data, files, name):
-        dur = data['content-duration']
-        for format in self.format:
-            try:
-                dur = time.strptime(dur, format)
-                dur = dur.tm_hour*3600 + dur.tm_min*60 + dur.tm_sec
-                dur = dur*1000
-                break
-            except:
-                logging.debug("trying next format")
-        return dur
\ No newline at end of file
+            (_('Date'), rendered_widgets[0], _('Time'), rendered_widgets[1]))
\ No newline at end of file