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

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

        def _filter_query(query, args):
    type_ = args.get('type', type=int)
    if type_:
        query = query.filter(Event.type == type_)

    user = args.get('user', type=int)
    if user:
        query = query.filter(Event.actor_id == user)

    return query
        


src/s/k/skylines-HEAD/skylines/frontend/views/timeline.py   skylines(Download)
from skylines.model.event import Event, group_events
from skylines.model import Flight
from .notifications import _filter_query
 
timeline_blueprint = Blueprint('timeline', 'skylines')
        .order_by(Event.time.desc())
 
    query = _filter_query(query, request.args)
 
    page = request.args.get('page', type=int, default=1)