analytics/maintenance.py
def get_statistic_by_name(stat_name):
    """
    Fetches a statistics based on the given class name. Does a look-up
    in the gadgets' registered statistics to find the specified one.
    """

    if stat_name == 'ALL':
        return get_statistic_models()

    for stat in get_statistic_models():
        if stat.__name__ == stat_name:
            return stat

    raise Exception, _("%(stat)s cannot be found.") % {'stat': stat_name}
def get_statistic_by_name(stat_name):
    """
    Fetches a statistics based on the given class name. Does a look-up
    in the gadgets' registered statistics to find the specified one.
    """

    if stat_name == 'ALL':
        return get_statistic_models()

    for stat in get_statistic_models():
        if stat.__name__ == stat_name:
            return stat

    raise Exception, _("%(stat)s cannot be found.") % {'stat': stat_name}
def get_statistic_by_name ( stat_name ) : if stat_name == 'ALL' : return get_statistic_models ( ) for stat in get_statistic_models ( ) : if stat . __name__ == stat_name : return stat raise Exception , _ ( "%(stat)s cannot be found." ) % { 'stat' : stat_name }
Fetches a statistics based on the given class name. Does a look-up
    in the gadgets' registered statistics to find the specified one.
Fetches a statistics based on the given class name . Does a look - up in the gadgets registered statistics to find the specified one .