site_cubicweb.py
author Christophe de Vienne <christophe@unlish.com>
Thu, 18 Sep 2014 22:33:04 +0200
changeset 11637 a9cde6a3394c
parent 11636 2babe3694bed
child 11673 c3a583e38360
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.

from logilab.common.configuration import REQUIRED

import cubicweb.schema

cubicweb.schema.INTERNAL_TYPES.add('CWSession')

options = (
    ('pyramid-auth-secret', {
        'type': 'string',
        'default': REQUIRED,
        'help': 'Secret phrase to encrypt the authentication cookie',
        'group': 'pyramid',
        'level': 3
    }),
    ('pyramid-session-secret', {
        'type': 'string',
        'default': REQUIRED,
        'help': 'Secret phrase to sign the session cookie',
        'group': 'pyramid',
        'level': 3
    }),
)