docs/narr/quickstart.rst
changeset 11587 18dd303225cd
parent 11585 7d6d4edc0ed0
equal deleted inserted replaced
11586:c7a25122af4d 11587:18dd303225cd
     1 Quick start
     1 Quick start
     2 ===========
     2 ===========
     3 
     3 
     4 .. highlight:: console
     4 .. highlight:: bash
     5 
     5 
     6 From CubicWeb
     6 Prerequites
     7 -------------
     7 -----------
     8 
     8 
     9 -   Install everything (here with pip, possibly in a virtualenv)::
     9 -   Install everything (here with pip, possibly in a virtualenv)::
    10 
    10 
    11         pip install pyramid-cubicweb cubicweb-pyramid pyramid_debugtoolbar
    11         pip install pyramid-cubicweb cubicweb-pyramid pyramid_debugtoolbar
    12         
       
    13 -   Make sure CubicWeb is in user mode::
       
    14 
    12 
    15         export CW_MODE=user
    13 -   Have a working Cubicweb instance, for example:
    16 
    14 
    17 -   Create a CubicWeb instance, and install the 'pyramid' cube on it (see
       
    18     :ref:`configenv` for more details on this step)::
       
    19 
    15 
    20         cubicweb-ctl create pyramid myinstance
    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
    21 
    24 
    22 -   Edit your ``~/etc/cubicweb.d/myinstance/all-in-one.conf`` and set values for
    25 -   Edit your ``~/etc/cubicweb.d/myinstance/all-in-one.conf`` and set values for
    23     :confval:`pyramid-auth-secret` and :confval:`pyramid-session-secret`.
    26     :confval:`pyramid-auth-secret` and :confval:`pyramid-session-secret`.
       
    27     *required if pyramid_cubicweb.auth and pyramid_cubiweb.session get
       
    28     included, which is the default*
       
    29 
       
    30 From CubicWeb
       
    31 -------------
    24 
    32 
    25 -   Start the instance with the :ref:`'pyramid' command <cubicweb-ctl_pyramid>`
    33 -   Start the instance with the :ref:`'pyramid' command <cubicweb-ctl_pyramid>`
    26     instead of 'start'::
    34     instead of 'start'::
    27 
    35 
    28         cubicweb-ctl pyramid --debug myinstance
    36         cubicweb-ctl pyramid --debug myinstance
    29 
    37 
    30 In a pyramid application
    38 In a pyramid application
    31 ------------------------
    39 ------------------------
    32 
    40 
    33 Coming soon.
    41 -   Create a pyramid application
       
    42 
       
    43 -   Include pyramid_cubicweb:
       
    44 
       
    45     .. code-block:: python
       
    46 
       
    47         def includeme(config):
       
    48             # ...
       
    49             config.include('pyramid_cubicweb')
       
    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).