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

    for parameter in player_parameters:
        if not parameter in dict:
            result[parameter] = str(get_player_setting(parameter))

    return result
Exemplo n.º 2
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_player_setting(parameter))
                actual_value = transform(value, t)

            self.options[parameter] = actual_value

        return render_to_string("video/flowplayer.html", self.options)