예제 #1
0
 def time_to_complete(self):
     from courses.templatetags.course_extras import time_estimate
     return '{} min.'.format(time_estimate(len(self.description.split())))
예제 #2
0
 def time_to_complete(self):
     from courses.templatetags.course_extras import time_estimate
     return '{} min.'.format(time_estimate(len(self.description.split())))
예제 #3
0
    def time_to_complete(self):
        """ Tell how long the course takes based on the description of the course """

        from courses.templatetags.course_extras import time_estimate
        return '{} min.'.format(time_estimate(len(self.description.split())))
예제 #4
0
 def time_to_complete(self):
     # we put the import statement here to avoid recursive imports
     from courses.templatetags.course_extras import time_estimate
     return '{} minutes'.format(time_estimate(len(
         self.description.split())))
예제 #5
0
 def time_to_complete(self):
     from courses.templatetags.course_extras import time_estimate  # import in function to avoid error, module imorts anothe module that is already imported by models.py
     return '{} min'.format(time_estimate(len(self.description.split())))
예제 #6
0
 def time_to_complete(self):
     # We do this here to avoid recursive importing since course_extras
     # also import models.Course...
     from courses.templatetags.course_extras import time_estimate
     return '{} min.'.format(time_estimate(len(self.description.split())))