|
1 Settings |
|
2 ======== |
|
3 |
|
4 .. _cubicweb_settings: |
|
5 |
|
6 Cubicweb Settings |
|
7 ----------------- |
|
8 |
|
9 Pyramid CubicWeb will make use of the following configuration entries if found |
|
10 in the cubicweb configuration (a.k.a. `all-in-one.conf`): |
|
11 |
|
12 .. warning:: |
|
13 |
|
14 These settings requires the `pyramid` cube to be enabled on the instance. |
|
15 |
|
16 .. confval:: pyramid-session-secret |
|
17 |
|
18 Secret phrase to sign the session cookie |
|
19 |
|
20 Used by :func:`pyramid_cubicweb.session.includeme` to configure the default session factory. |
|
21 |
|
22 .. code-block:: ini |
|
23 |
|
24 pyramid-session-secret = <some very secret passphrase> |
|
25 |
|
26 .. confval:: pyramid-auth-secret |
|
27 |
|
28 Secret phrase to sign the authentication cookie |
|
29 |
|
30 Used by :func:`pyramid_cubicweb.auth.includeme` to configure the default authentication policy. |
|
31 |
|
32 .. code-block:: ini |
|
33 |
|
34 pyramid-session-secret = <some other very secret passphrase> |
|
35 |
|
36 |
|
37 .. _pyramid_settings: |
|
38 |
|
39 Pyramid Settings |
|
40 ---------------- |
|
41 |
|
42 If a ``pyramid.ini`` file is found in the instance home directory (where the |
|
43 ``all-in-one.conf`` file is), its ``[main]`` section will be read and used as the |
|
44 ``settings`` of the pyramid Configurator. |
|
45 |
|
46 This configuration file is almost the same as the one read by ``pserve``, which |
|
47 allow to easily add any pyramid extension and configure it. |
|
48 |
|
49 A typical ``pyramid.ini`` file is: |
|
50 |
|
51 .. code-block:: ini |
|
52 |
|
53 [main] |
|
54 pyramid.includes = |
|
55 pyramid_redis_sessions |
|
56 |
|
57 cubicweb.defaults = no |
|
58 cubicweb.includes = |
|
59 pyramid_cubicweb.auth |
|
60 pyramid_cubicweb.login |
|
61 |
|
62 cubicweb.profile = no |
|
63 |
|
64 redis.sessions.secret = your_cookie_signing_secret |
|
65 redis.sessions.timeout = 1200 |
|
66 |
|
67 redis.sessions.host = mywheezy |
|
68 |
|
69 The Pyramid CubicWeb specific configuration entries are: |
|
70 |
|
71 .. confval:: cubicweb.includes (list) |
|
72 |
|
73 Same as ``pyramid.includes``, but the includes are done after the cubicweb |
|
74 specific registry entries are initialized. |
|
75 |
|
76 Useful to include extensions that requires these entries. |
|
77 |
|
78 .. confval:: cubicweb.bwcompat (bool) |
|
79 |
|
80 (True) Enable/disable backward compatibility. See :ref:`bwcompat_module`. |
|
81 |
|
82 .. confval:: cubicweb.defaults (bool) |
|
83 |
|
84 (True) Enable/disable defaults. See :ref:`defaults_module`. |
|
85 |
|
86 .. confval:: cubicweb.profile (bool) |
|
87 |
|
88 (False) Enable/disable profiling. See :ref:`profiling`. |