(feature, feature_rate=None)
return {
        'name': feature.name,
        'feature_type': feature.feature_type,
        'feature_id': feature.id,
        'rate_id': feature_rate.id,
        'monthly_fee': str(feature_rate.monthly_fee),
        'monthly_limit': feature_rate.monthly_limit,
        'per_excess_fee': str(feature_rate.per_excess_fee),
    }
This will be turned into a JSON representation of this Feature and its FeatureRate
This will be turned into a JSON representation of this Feature and its FeatureRate
This will be turned into a JSON representation of this Feature and its FeatureRate
def fmt_feature_rate_dict(feature, feature_rate=None):
    """
    This will be turned into a JSON representation of this Feature and its FeatureRate
    """
    if feature_rate is None:
        feature_rate = feature.get_rate()
    return {
        'name': feature.name,
        'feature_type': feature.feature_type,
        'feature_id': feature.id,
        'rate_id': feature_rate.id,
        'monthly_fee': str(feature_rate.monthly_fee),
        'monthly_limit': feature_rate.monthly_limit,
        'per_excess_fee': str(feature_rate.per_excess_fee),
    }
def fmt_feature_rate_dict ( feature , feature_rate = None ) : if feature_rate is None : feature_rate = feature . get_rate ( ) return { 'name' : feature . name , 'feature_type' : feature . feature_type , 'feature_id' : feature . id , 'rate_id' : feature_rate . id , 'monthly_fee' : str ( feature_rate . monthly_fee ) , 'monthly_limit' : feature_rate . monthly_limit , 'per_excess_fee' : str ( feature_rate . per_excess_fee ) , }