def rating_widget(key='rating', maximum=10):
    """A customizable star rating widget"""
    widget = {'key': 'rating', 'type': 'template', 'template':
        '<div class="rating">   <span class="fa fa-star-o" ng-repeat="rating in []|range: {1} - model.{0}"         ng-click="model.{0} = {1} - rating"></span>   <span class="fa fa-star" ng-repeat="rating in []|range: model.{0}"         ng-click="model.{0} = model.{0} - rating"></span></div><span>{{model.{0}}} out of 10</span>'
        .format(key, maximum)}
    return widget
