--- a/doc/book/en/tutorials/advanced/index.rst Wed Apr 28 15:42:10 2010 +0200
+++ b/doc/book/en/tutorials/advanced/index.rst Thu Apr 29 06:53:48 2010 +0200
@@ -508,9 +508,11 @@
It's not complete, but show most things you'll want to do in tests: adding some
content, creating users and connecting as them in the test, etc...
-To run it type: ::
+To run it type:
- [syt@scorpius test]$ pytest unittest_sytweb.py
+.. sourcecode:: bash
+
+ $ pytest unittest_sytweb.py
======================== unittest_sytweb.py ========================
-> creating tables [....................]
-> inserting default user and default groups.
@@ -524,9 +526,11 @@
The first execution is taking time, since it creates a sqlite database for the
-test instance. The second one will be much quicker: ::
+test instance. The second one will be much quicker:
- [syt@scorpius test]$ pytest unittest_sytweb.py
+.. sourcecode:: bash
+
+ $ pytest unittest_sytweb.py
======================== unittest_sytweb.py ========================
.
----------------------------------------------------------------------
@@ -537,12 +541,11 @@
If you do some changes in your schema, you'll have to force regeneration of that
database. You do that by removing the tmpdb files before running the test: ::
- [syt@scorpius test]$ rm tmpdb*
+ $ rm tmpdb*
.. Note::
- pytest is a very convenient utilities to control test execution, from the `logilab-common`_
- package
+ pytest is a very convenient utility used to control test execution. It is available from the `logilab-common`_ package.
.. _`logilab-common`: http://www.logilab.org/project/logilab-common
@@ -578,7 +581,7 @@
To migrate my instance I simply type::
- [syt@scorpius ~]$ cubicweb-ctl upgrade sytweb
+ cubicweb-ctl upgrade sytweb
I'll then be asked some questions to do the migration step by step. You should say
YES when it asks if a backup of your database should be done, so you can get back
--- a/doc/book/en/tutorials/base/blog-in-five-minutes.rst Wed Apr 28 15:42:10 2010 +0200
+++ b/doc/book/en/tutorials/base/blog-in-five-minutes.rst Thu Apr 29 06:53:48 2010 +0200
@@ -29,9 +29,9 @@
Instance parameters
~~~~~~~~~~~~~~~~~~~
-If the database installation failed, you'd like to change some instance parameters, for example, the database host or the user name. These informations can be edited in the `source` file located in the /etc/cubicweb.d/myblog directory.
+If you would like to change some instance parameters, for example, the database host or the user name, edit the `source` file located in the /etc/cubicweb.d/myblog directory.
-Then relaunch the database creation:
+Then relaunch the database creation::
cubicweb-ctl db-create myblog
--- a/doc/book/en/tutorials/base/conclusion.rst Wed Apr 28 15:42:10 2010 +0200
+++ b/doc/book/en/tutorials/base/conclusion.rst Thu Apr 29 06:53:48 2010 +0200
@@ -3,13 +3,11 @@
What's next?
------------
-We demonstrated how from a straight out of the box *CubicWeb* installation, you
-can build your web application based on a data model. It's all already there:
-views, templates, permissions, etc. The step forward is now for you to customize
-according to your needs.
+In this chapter, we have seen have you can, right after the installation of *CubicWeb*, build a web application in five minutes by defining a data model. Everything is there already: views, templates, permissions, etc.
-Many features are available to extend your application, for example: RSS channel
-integration (:ref:`XmlAndRss`), hooks (:ref:`hooks`), support of sources such as
-Google App Engine (:ref:`GoogleAppEngineSource`) and lots of others to discover
-through our book.
+The next step is to change the design and learn about the many features available to customize and extend your application: RSS channels (:ref:`XmlAndRss`), events (:ref:`hooks`), support of sources such as
+Google App Engine (:ref:`GoogleAppEngineSource`), etc.
+You will find more `tutorials and howtos`_ in the blog published on the CubicWeb.org website.
+
+.. _`tutorials and howtos`: http://www.cubicweb.org/view?rql=Any+X+ORDERBY+D+DESC+WHERE+X+is+BlogEntry%2C+T+tags+X%2C+T+name+IN+%28%22tutorial%22%2C+%22howto%22%29%2C+X+creation_date+D
--- a/doc/book/en/tutorials/base/create-cube.rst Wed Apr 28 15:42:10 2010 +0200
+++ b/doc/book/en/tutorials/base/create-cube.rst Thu Apr 29 06:53:48 2010 +0200
@@ -30,7 +30,7 @@
Customize the views of your data: how and which part of your data are showed.
-Note: views don't concern the look'n'feel or design of the site. For that, you should use CSS instead, and default CSS or your new cube are located in 'blog/data/'.
+.. note:: views do not define the look'n'feel and the design of your application. For that, you will use CSS and the files located 'blog/data/'.
5. :ref:`DefineEntities`
@@ -396,6 +396,7 @@
want to add a ``category`` attribute in the ``Blog`` data type. This is called a migration.
The required steps are:
+
1. modify the file ``schema.py``. The ``Blog`` class looks now like this:
.. sourcecode:: python
@@ -405,7 +406,11 @@
description = String()
category = String(required=True, vocabulary=(_('Professional'), _('Personal')), default='Personal')
-2. stop your ``blogdemo`` instance
+2. stop your ``blogdemo`` instance:
+
+.. sourcecode:: bash
+
+ cubicweb-ctl stop blogdemo
3. start the cubicweb shell for your instance by running the following command:
@@ -413,15 +418,21 @@
cubicweb-ctl shell blogdemo
-4. in the shell, execute:
+4. at the cubicweb shell prompt, execute:
.. sourcecode:: python
add_attribute('Blog', 'category')
-5. you can restart your instance, modify a blog entity and check that the new attribute
+5. restart your instance:
+
+.. sourcecode:: bash
+
+ cubicweb-ctl start blogdemo
+
+6. modify a blog entity and check that the new attribute
``category`` has been added.
-Of course, you may also want to add relations, entity types, ... See :ref:`migration`
+Of course, you may also want to add relations, entity types, etc. See :ref:`migration`
for a list of all available migration commands.