equal
deleted
inserted
replaced
|
1 Quick start |
|
2 =========== |
|
3 |
|
4 .. highlight:: bash |
|
5 |
|
6 Prerequites |
|
7 ----------- |
|
8 |
|
9 - Install everything (here with pip, possibly in a virtualenv):: |
|
10 |
|
11 pip install pyramid-cubicweb cubicweb-pyramid pyramid_debugtoolbar |
|
12 |
|
13 - Have a working Cubicweb instance, for example: |
|
14 |
|
15 |
|
16 - Make sure CubicWeb is in user mode:: |
|
17 |
|
18 export CW_MODE=user |
|
19 |
|
20 - Create a CubicWeb instance, and install the 'pyramid' cube on it (see |
|
21 :ref:`configenv` for more details on this step):: |
|
22 |
|
23 cubicweb-ctl create pyramid myinstance |
|
24 |
|
25 - Edit your ``~/etc/cubicweb.d/myinstance/all-in-one.conf`` and set values for |
|
26 :confval:`pyramid-auth-secret` and :confval:`pyramid-session-secret`. |
|
27 *required if cubicweb.pyramid.auth and pyramid_cubiweb.session get |
|
28 included, which is the default* |
|
29 |
|
30 From CubicWeb |
|
31 ------------- |
|
32 |
|
33 - Start the instance with the :ref:`'pyramid' command <cubicweb-ctl_pyramid>` |
|
34 instead of 'start':: |
|
35 |
|
36 cubicweb-ctl pyramid --debug myinstance |
|
37 |
|
38 In a pyramid application |
|
39 ------------------------ |
|
40 |
|
41 - Create a pyramid application |
|
42 |
|
43 - Include cubicweb.pyramid: |
|
44 |
|
45 .. code-block:: python |
|
46 |
|
47 def includeme(config): |
|
48 # ... |
|
49 config.include('cubicweb.pyramid') |
|
50 # ... |
|
51 |
|
52 - Configure the instance name (in the .ini file): |
|
53 |
|
54 .. code-block:: ini |
|
55 |
|
56 cubicweb.instance = myinstance |
|
57 |
|
58 - Configure the base-url and https-url in all-in-one.conf to match the ones |
|
59 of the pyramid configuration (this is a temporary limitation). |