equal
deleted
inserted
replaced
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 application 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') |
75 cur = cnx.cursor() |
75 cur = cnx.cursor() |
76 for name in ('Personal', 'Professional', 'Computers'): |
76 for name in ('Personal', 'Professional', 'Computers'): |
77 cur.execute('INSERT Blog B: B name %s', name) |
77 cur.execute('INSERT Blog B: B name %s', name) |
78 cnx.commit() |
78 cnx.commit() |
79 |
79 |
80 |
80 |