web/webconfig.py
branchstable
changeset 9013 b4bcabf55e77
parent 8989 8742f4bf029f
child 9257 ce338133c92c
child 9317 0f2b80078aeb
equal deleted inserted replaced
9012:2cf127d4f5fd 9013:b4bcabf55e77
    26 from os.path import join, exists, split, isdir
    26 from os.path import join, exists, split, isdir
    27 from warnings import warn
    27 from warnings import warn
    28 
    28 
    29 from logilab.common.decorators import cached, cachedproperty
    29 from logilab.common.decorators import cached, cachedproperty
    30 from logilab.common.deprecation import deprecated
    30 from logilab.common.deprecation import deprecated
       
    31 from logilab.common.configuration import merge_options
    31 
    32 
    32 from cubicweb import ConfigurationError
    33 from cubicweb import ConfigurationError
    33 from cubicweb.toolsutils import read_config
    34 from cubicweb.toolsutils import read_config
    34 from cubicweb.cwconfig import CubicWebConfiguration, register_persistent_options, merge_options
    35 from cubicweb.cwconfig import CubicWebConfiguration, register_persistent_options
    35 
    36 
    36 
    37 
    37 register_persistent_options( (
    38 register_persistent_options( (
    38     # site-wide only web ui configuration
    39     # site-wide only web ui configuration
    39     ('site-title',
    40     ('site-title',
   108           'default': None,
   109           'default': None,
   109           'help': 'web instance query log file',
   110           'help': 'web instance query log file',
   110           'group': 'web', 'level': 3,
   111           'group': 'web', 'level': 3,
   111           }),
   112           }),
   112         # web configuration
   113         # web configuration
       
   114         ('ui-cube',
       
   115          {'type' : 'string',
       
   116           'default': None,
       
   117           'help': 'the name of the UI cube that will be loaded before all other '\
       
   118           'cubes. Setting this value to None will instruct cubicweb not to load '\
       
   119           'any extra cube.',
       
   120           'group': 'web', 'level': 3,
       
   121           }),
   113         ('https-url',
   122         ('https-url',
   114          {'type' : 'string',
   123          {'type' : 'string',
   115           'default': None,
   124           'default': None,
   116           'help': 'web server root url on https. By specifying this option your '\
   125           'help': 'web server root url on https. By specifying this option your '\
   117           'site can be available as an http and https site. Authenticated users '\
   126           'site can be available as an http and https site. Authenticated users '\
   158          {'type' : 'time',
   167          {'type' : 'time',
   159           'default': '5min',
   168           'default': '5min',
   160           'help': 'Same as cleanup-session-time but specific to anonymous '
   169           'help': 'Same as cleanup-session-time but specific to anonymous '
   161           'sessions. You can have a much smaller timeout here since it will be '
   170           'sessions. You can have a much smaller timeout here since it will be '
   162           'transparent to the user. Default to 5min.',
   171           'transparent to the user. Default to 5min.',
   163           'group': 'web', 'level': 3,
       
   164           }),
       
   165         ('force-html-content-type',
       
   166          {'type' : 'yn',
       
   167           'default': False,
       
   168           'help': 'force text/html content type for your html pages instead of cubicweb user-agent based'\
       
   169           'deduction of an appropriate content type',
       
   170           'group': 'web', 'level': 3,
   172           'group': 'web', 'level': 3,
   171           }),
   173           }),
   172         ('embed-allowed',
   174         ('embed-allowed',
   173          {'type' : 'regexp',
   175          {'type' : 'regexp',
   174           'default': None,
   176           'default': None,