Exemple #1
0
def open_etherpad(pad, author, validUntil, e=None, **kwargs):
    if not e:
        e = get_etherpad_client()
    data = e.createSession(
        groupID=pad.groupid,
        authorID=author.etherpad_id,
        validUntil=validUntil)
    response = jsonify(
        success=True,
        pad='%s/p/%s' % (settings.ETHERPAD_URL, pad.padid),
        title=pad.title,
        **kwargs)
    set_cookie(response, 'sessionID', data['sessionID'])
    return response
Exemple #2
0
def open_etherpad(pad, author, validUntil, etherpad=None, **kwargs):
    """
    Opens an etherpad-lite document. The etherpad client is used
    to get a cookie for a session on the pad.
    """
    if not etherpad:
        etherpad = get_etherpad_client()
    data = etherpad.createSession(groupID=pad.groupid,
                                  authorID=author.etherpad_id,
                                  validUntil=validUntil)
    response = jsonify(success=True,
                       pad='%s/p/%s' % (settings.ETHERPAD_URL, pad.padid),
                       title=pad.title,
                       **kwargs)
    set_cookie(response, 'sessionID', data['sessionID'])
    return response
Exemple #3
0
def open_etherpad(pad, author, validUntil, etherpad=None, **kwargs):
    """
    Opens an etherpad-lite document. The etherpad client is used
    to get a cookie for a session on the pad.
    """
    if not etherpad:
        etherpad = get_etherpad_client()
    data = etherpad.createSession(
        groupID=pad.groupid,
        authorID=author.etherpad_id,
        validUntil=validUntil
    )
    response = jsonify(
        success=True,
        pad='%s/p/%s' % (settings.ETHERPAD_URL, pad.padid),
        title=pad.title,
        **kwargs
    )
    set_cookie(response, 'sessionID', data['sessionID'])
    return response