doc/book/en/annexes/cookbook.rst
changeset 2476 1294a6bdf3bf
parent 2175 16d3c37c5d28
child 2539 0f26a76b0348
equal deleted inserted replaced
2475:b6753521129d 2476:1294a6bdf3bf
     8 
     8 
     9 
     9 
    10 * How to import LDAP users in *CubicWeb*?
    10 * How to import LDAP users in *CubicWeb*?
    11 
    11 
    12   Here is a very useful script which enables you to import LDAP users
    12   Here is a very useful script which enables you to import LDAP users
    13   into your *CubicWeb* application by running the following: ::
    13   into your *CubicWeb* instance by running the following: ::
    14 
    14 
    15 
    15 
    16     import os
    16     import os
    17     import pwd
    17     import pwd
    18     import sys
    18     import sys
    64 
    64 
    65 
    65 
    66 * How to load data from a script?
    66 * How to load data from a script?
    67 
    67 
    68   The following script aims at loading data within a script assuming pyro-nsd is
    68   The following script aims at loading data within a script assuming pyro-nsd is
    69   running and your application is configured with ``pyro-server=yes``, otherwise
    69   running and your instance is configured with ``pyro-server=yes``, otherwise
    70   you would not be able to use dbapi. ::
    70   you would not be able to use dbapi. ::
    71 
    71 
    72     from cubicweb import dbapi
    72     from cubicweb import dbapi
    73 
    73 
    74     cnx = dbapi.connection(database='instance-id', user='admin', password='admin')
    74     cnx = dbapi.connection(database='instance-id', user='admin', password='admin')