schema.py
author Christophe de Vienne <christophe@unlish.com>
Thu, 18 Sep 2014 22:33:04 +0200
changeset 11637 a9cde6a3394c
parent 11634 fa614537e5ee
permissions -rw-r--r--
Implements auto-reload and daemon mode. Heavily inspired by pyramid pserve, with pieces of code taken from it. auto-reload Start the server in a subprocess that auto-stops when a file is modified, and exit with a specific code. daemon mode Uses some code from pserve, but use the cw configuratione so the command is compatible with 'status' and 'stop' commands.

# pylint: disable-msg=E0611,F0401
from yams.buildobjs import EntityType, Bytes


class CWSession(EntityType):
    """
    Persistent session support

    Used by pyramid_cubiweb to store the session datas.

    It is a partial copy of the yet-to-integrate patch of cubicweb that
    provides cubicweb sessions persistency.

    While the same structure will be used by pyramid_cubicweb persistent
    sessions and Cubicweb persistent sessions, the two concepts are slightly
    different and will NOT co-exist in a single application.
    """

    __permissions__ = {
        'read':   (),
        'add':    (),
        'update': (),
        'delete': ()
    }

    cwsessiondata = Bytes()