Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5)  |  Call(4)  |  Derive(0)  |  Import(1)

src/m/e/mediadrop-HEAD/mediadrop/model/media.py   mediadrop(Download)
from mediadrop.lib.util import calculate_popularity
from mediadrop.lib.xhtml import line_break_xhtml, strip_xhtml
from mediadrop.model import (get_available_slug, SLUG_LENGTH, 
    _mtm_count_property, _properties_dict_from_labels, MatchAgainstClause)
from mediadrop.model.meta import DBSession, metadata
_tags_mapper = class_mapper(Tag, compile=False)
_tags_mapper.add_properties(_properties_dict_from_labels(
    _mtm_count_property('media_count', media_tags),
    _mtm_count_property('media_count_published', media_tags, [
        media.c.reviewed == True,
_categories_mapper = class_mapper(Category, compile=False)
_categories_mapper.add_properties(_properties_dict_from_labels(
    _mtm_count_property('media_count', media_categories),
    _mtm_count_property('media_count_published', media_categories, [
        media.c.reviewed == True,