Esempio n. 1
0
def add_defaults(dict):
    result = dict

    for parameter in thumbnails_parameters:
        if not parameter in dict:
            try:
                result[parameter] = str(get_thumbnail_setting(parameter))
            except:
                pass

    return result
Esempio n. 2
0
def add_defaults(dict):
    result = dict

    for parameter in thumbnails_parameters:
        if not parameter in dict:
            try:
                result[parameter] = str(get_thumbnail_setting(parameter))
            except:
                pass

    return result
Esempio n. 3
0
    def render(self, context):
        for parameter, value in self.options.items():
            try:
                tmp = template.Variable(value)
                actual_value = tmp.resolve(context)
            except template.VariableDoesNotExist:
                t = type(get_thumbnail_setting(parameter))
                actual_value = transform(value, t)

            self.options[parameter] = actual_value

        return render_to_string("video/thumbnails.html", self.options)
Esempio n. 4
0
    def render(self, context):
        for parameter, value in self.options.items():
            try:
                tmp = template.Variable(value)
                actual_value = tmp.resolve(context)
            except template.VariableDoesNotExist:
                t = type(get_thumbnail_setting(parameter))
                actual_value = transform(value, t)

            self.options[parameter] = actual_value

        return render_to_string("video/thumbnails.html", self.options)
Esempio n. 5
0
 def get_upload_to(self, attname):
     tmp = self.video.get_upload_to()
     thumb_dir = get_thumbnail_setting('dir')
     return "%s/%s" % (tmp, thumb_dir)
Esempio n. 6
0
 def get_upload_to(self, attname):
     tmp = self.video.get_upload_to()
     thumb_dir = get_thumbnail_setting('dir')
     return "%s/%s" % (tmp, thumb_dir)