예제 #1
0
def seminars_lucky(*args, **kwds):
    """
    Replacement for db.seminars.lucky to account for versioning, return a WebSeminar object or None.
    """
    organizer_dict = kwds.pop("organizer_dict", {})
    return lucky_distinct(db.seminars, _selecter, _construct(organizer_dict),
                          *args, **kwds)
예제 #2
0
파일: talk.py 프로젝트: edgarcosta/seminars
def talks_lucky(*args, **kwds):
    """
    Replacement for db.talks.lucky to account for versioning, return a WebTalk object or None.
    """
    seminar_dict = kwds.pop("seminar_dict", {})
    return lucky_distinct(db.talks, _selecter, _construct(seminar_dict), *args,
                          **kwds)
예제 #3
0
def talks_lucky(*args, **kwds):
    """
    Replacement for db.talks.lucky to account for versioning, return a WebTalk object or None.
    """
    seminar_dict = kwds.pop("seminar_dict", {})
    objects = kwds.pop("objects", True)
    sanitized = kwds.pop("sanitized", False)
    if sanitized:
        table = sanitized_table("talks")
    else:
        table = db.talks
    return lucky_distinct(table, _selecter, _construct(seminar_dict, objects=objects), *args, **kwds)
예제 #4
0
def seminars_lucky(*args, **kwds):
    """
    Replacement for db.seminars.lucky to account for versioning, return a WebSeminar object or None.
    """
    organizer_dict = kwds.pop("organizer_dict", {})
    institution_dict = kwds.pop("institution_dict", {})
    objects = kwds.pop("objects", True)
    sanitized = kwds.pop("sanitized", False)
    if sanitized:
        table = sanitized_table("seminars")
    else:
        table = db.seminars
    return lucky_distinct(table, _selecter, _construct(organizer_dict, institution_dict, objects=objects), *args, **kwds)
예제 #5
0
def talks_lucky(*args, **kwds):
    """
    Replacement for db.talks.lucky to account for versioning, return a WebTalk object or None.
    """
    return lucky_distinct(db.talks, _selecter, _construct, *args, **kwds)
예제 #6
0
def seminars_lucky(*args, **kwds):
    """
    Replacement for db.seminars.lucky to account for versioning, return a WebSeminar object or None.
    """
    return lucky_distinct(db.seminars, _selecter, _construct, *args, **kwds)