Commit 63698df6 authored by Nicolas Chauvat's avatar Nicolas Chauvat
Browse files

[doc] improvements

--HG--
branch : stable
parent 7f576dc9502e
......@@ -6,7 +6,7 @@
Part II - Development
=====================
This part is about developing web applications with the `CubicWeb` framework.
This part is about developing web applications with the *CubicWeb* framework.
.. toctree::
:maxdepth: 1
......
......@@ -11,7 +11,7 @@ The main principles are:
* permissions (read, update, create, delete)
* permissions are assigned to groups (and not to users)
For `CubicWeb` in particular:
For *CubicWeb* in particular:
* we associate rights at the enttities/relations schema level
* for each entity, we distinguish four kind of permissions: read,
......
......@@ -7,7 +7,7 @@ Tutoriel : créer votre première application web pour Google AppEngine
Ce tutoriel va vous guider pas à pas a construire une apllication web
de gestion de Blog afin de vous faire découvrir les fonctionnalités de
`CubicWeb`.
*CubicWeb*.
Nous supposons que vous avec déjà suivi le guide :ref:`installationGAE`.
......@@ -23,7 +23,7 @@ d'application web et nous allons expliciter toutes les étapes nécessaires
cubicweb-ctl newgapp blogdemo
`newgapp` est la commande permettant de créer une instance `CubicWeb` pour
`newgapp` est la commande permettant de créer une instance *CubicWeb* pour
le datastore.
Assurez-vous que votre variable d'environnement ``PYTHONPATH`` est correctement
......@@ -32,7 +32,7 @@ initialisée (:ref:`installationGAE`)
Définissez un schéma
--------------------
Le modèle de données ou schéma est au coeur d'une application `CubicWeb`.
Le modèle de données ou schéma est au coeur d'une application *CubicWeb*.
C'est là où vous allez devoir définir le type de contenu que votre application
devra gérer.
......@@ -180,7 +180,7 @@ appartient, ``MyLife``.
:alt: displaying the detailed view of a blogentry
Rappelez-vous que pour le moment, tout a été géré par la plate-forme
`CubicWeb` et que la seule chose qui a été fournie est le schéma de
*CubicWeb* et que la seule chose qui a été fournie est le schéma de
données. D'ailleurs pour obtenir une vue graphique du schéma, exécutez
la commande ``laxctl genschema blogdemo`` et vous pourrez visualiser
votre schéma a l'URL suivante : http://localhost:8080/schema
......
......@@ -2,7 +2,7 @@
.. _QuickInstall:
Quick Installation of a `CubicWeb` instance
Quick Installation of a *CubicWeb* instance
===========================================
.. include:: C010-setup.en.txt
......
......@@ -7,7 +7,7 @@ Creation of your first instance
What is an instance?
--------------------
A `CubicWeb` instance is a container that
A *CubicWeb* instance is a container that
refers to cubes and configuration parameters for your web application.
Each instance is stored as a directory in ``~/etc/cubicweb.d`` which enables
us to run your application.
......@@ -26,12 +26,12 @@ for a Mercurial installation or in ``/usr/share/cubicweb/cubes`` for
a debian package installation. For example, the 'blog' cube defines the entities
blogs and blogentries.
When an `CubicWeb` instance is created, you list the cubes that you want to use.
When an *CubicWeb* instance is created, you list the cubes that you want to use.
Using a cube means having the entities defined in your cube's schema
available in your instance as well as their views and workflows.
Creating a basic `CubicWeb` Instance
Creating a basic *CubicWeb* Instance
------------------------------------
We can create an instance to view our
......@@ -55,10 +55,10 @@ please use the login you create at the time you configured the database
(:ref:`ConfigurationPostgres`).
It is important to distinguish here the user used to access the database and
the user used to login to the cubicweb application. When a `CubicWeb` application
the user used to login to the cubicweb application. When a *CubicWeb* application
starts, it uses the login/psswd for the database to get the schema and handle
low level transaction. But, when ``cubicweb-ctl create`` asks for
a manager login/psswd of `CubicWeb`, it refers to an application user
a manager login/psswd of *CubicWeb*, it refers to an application user
to administrate your web application.
The configuration files are stored in *~/etc/cubicweb.d/myblog/*.
......
......@@ -27,7 +27,7 @@ It is important to distinguish here the user used to access the database and the
user used to login to the cubicweb application. When an instance starts, it uses
the login/psswd for the database to get the schema and handle low level
transaction. But, when :command:`cubicweb-ctl create` asks for a manager
login/psswd of `CubicWeb`, it refers to the user you will use during the
login/psswd of *CubicWeb*, it refers to the user you will use during the
development to administrate your web application. It will be possible, later on,
to use this user to create others users for your final web application.
......
......@@ -11,7 +11,7 @@ framework, but Google stated at Google IO 2008 that it would not
support a specific Python web framework and that all
community-supported frameworks would be more than welcome [1]_.
Therefore `Logilab`_ ported `CubicWeb` to run on top of `Google AppEngine`'s
Therefore `Logilab`_ ported *CubicWeb* to run on top of `Google AppEngine`'s
datastore.
.. _`Google AppEngine`: http://code.google.com/appengine/docs/whatisgoogleappengine.html
......@@ -25,7 +25,7 @@ Download the source
http://code.google.com/appengine/downloads.html
Please follow instructions on how to install `CubicWeb` framework
Please follow instructions on how to install *CubicWeb* framework
(:ref:`CubicWebInstallation`).
Installation
......@@ -76,7 +76,7 @@ This will create a directory containing ::
This skeleton directory is a working `AppEngine` application. You will
recognize the files ``app.yaml`` and ``main.py``. All the rest is the
`CubicWeb` framework and its third-party libraries. You will notice that
*CubicWeb* framework and its third-party libraries. You will notice that
the directory ``cubes`` is a library of reusable cubes.
The main directories that you should know about are:
......@@ -102,10 +102,10 @@ Setup
Once you executed ``cubicweb-ctl newgapp <myapp>``, you can use that ``myapp/``
as an application directory and do as follows.
This installation directory provides a configuration for an instance of `CubicWeb`
This installation directory provides a configuration for an instance of *CubicWeb*
ported for Google App Engine. It is installed with its own command ``laxctl``
which is a port of the command tool ``cubicweb-ctl`` originally developped for
`CubicWeb`.
*CubicWeb*.
You can have the details of available commands by running ::
......@@ -115,7 +115,7 @@ You can have the details of available commands by running ::
Generating translation files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
`CubicWeb` is fully internationalized. Translation catalogs are found in
*CubicWeb* is fully internationalized. Translation catalogs are found in
``myapp/i18n``. To compile the translation files, use the `gettext` tools
or the ``laxctl`` command ::
......
......@@ -6,7 +6,7 @@
Part III - Administration
-------------------------
This part is for installation and administration of the `CubicWeb` framework and
This part is for installation and administration of the *CubicWeb* framework and
applications based on that framework.
.. toctree::
......@@ -25,7 +25,7 @@ applications based on that framework.
RQL logs
--------
You can configure the `CubicWeb` application to keep a log
You can configure the *CubicWeb* application to keep a log
of the queries executed against your database. To do so,
edit the configuration file of your application
``.../etc/cubicweb.d/myapp/all-in-one.conf`` and uncomment the
......
......@@ -3,13 +3,13 @@
.. _SetUpEnv:
===================================================
Installation and set-up of a `CubicWeb` environment
Installation and set-up of a *CubicWeb* environment
===================================================
Installation of `Cubicweb` and its dependencies
-----------------------------------------------
`CubicWeb` is packaged for Debian and Ubuntu, but can be installed from source
*CubicWeb* is packaged for Debian and Ubuntu, but can be installed from source
using a tarball or the Mercurial version control system.
.. _DebianInstallation:
......@@ -88,7 +88,7 @@ Then you can install:
Environment configuration
-------------------------
If you installed `CubicWeb` by cloning the Mercurial forest, then you
If you installed *CubicWeb* by cloning the Mercurial forest, then you
will need to update the environment variable PYTHONPATH by adding
the path to the forest ``cubicweb``:
......
......@@ -7,10 +7,10 @@ We gathered together some of our tricks and scripts that could make
life easier.
* How to import LDAP users in `CubicWeb`?
* How to import LDAP users in *CubicWeb*?
Here is a very useful script which enables you to import LDAP users
into your `CubicWeb` application by running the following: ::
into your *CubicWeb* application by running the following: ::
import os
......
......@@ -5,7 +5,7 @@
``cubicweb-ctl`` tool
=====================
`cubicweb-ctl` is the swiss knife to manage `CubicWeb` instances.
`cubicweb-ctl` is the swiss knife to manage *CubicWeb* instances.
The general syntax is ::
cubicweb-ctl <command> [options command] <arguments commands>
......@@ -15,7 +15,7 @@ To view available commands ::
cubicweb-ctl
cubicweb-ctl --help
Please note that the commands available depends on the `CubicWeb` packages
Please note that the commands available depends on the *CubicWeb* packages
and cubes that have been installed.
To view the help menu on specific command ::
......@@ -62,7 +62,7 @@ Commands to control instances
Commands to maintain instances
------------------------------
* ``upgrade``, launches the existing instances migration when a new version
of `CubicWeb` or the cubes installed is available
of *CubicWeb* or the cubes installed is available
* ``shell``, opens a migration shell for manual maintenance of the instance
* ``db-dump``, creates a dump of the system database
* ``db-restore``, restores a dump of the system database
......@@ -73,7 +73,7 @@ Commands to maintain instances
Commands to maintain i18n catalogs
----------------------------------
* ``i18ncubicweb``, regenerates messages catalogs of the `CubicWeb` library
* ``i18ncubicweb``, regenerates messages catalogs of the *CubicWeb* library
* ``i18ncube``, regenerates the messages catalogs of a cube
* ``i18ninstance``, recompiles the messages catalogs of an instance.
This is automatically done while upgrading.
......
......@@ -18,12 +18,12 @@ Why does not CubicWeb have a template language ?
preferred template language if you want. [explain how to use a
template language]
`CubicWeb` does not define its own templating language as this was
*CubicWeb* does not define its own templating language as this was
not our goal. Based on our experience, we realized that
we could gain productivity by letting designers use design tools
and developpers develop without the use of the templating language
as an intermediary that could not be anyway efficient for both parties.
Python is the templating language that we use in `CubicWeb`, but again,
Python is the templating language that we use in *CubicWeb*, but again,
it does not prevent you from using a templating language.
The reason template languages are not used in this book is that
......@@ -53,7 +53,7 @@ Why do you use the LGPL license to prevent me from doing X ?
Publishing a web site has nothing to do with redistributing
source code. A fair amount of companies use modified LGPL code
for internal use. And someone could publish a `CubicWeb` component
for internal use. And someone could publish a *CubicWeb* component
under a BSD licence for others to plug into a LGPL framework without
any problem. The only thing we are trying to prevent here is someone
taking the framework and packaging it as closed source to his own
......
......@@ -12,7 +12,7 @@ user should see virtually no difference between an attribute and a
relation).
RQL is inspired by SQL but is the highest level. A knowledge of the
`CubicWeb` schema defining the application is necessary.
*CubicWeb* schema defining the application is necessary.
Comparison with existing languages
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
......@@ -22,7 +22,7 @@ SQL
RQL builds on the features of SQL but is at a higher level
(the current implementation of RQL generates SQL). For that it is limited
to the way of browsing relations and introduces variables.
The user does not need to know the model underlying SQL, but the `CubicWeb`
The user does not need to know the model underlying SQL, but the *CubicWeb*
schema defining the application.
Versa
......
......@@ -67,7 +67,7 @@ Logical Operators
of logical operators (see :ref:`PriorityOperators`).
Mathematical Operators
````````````````````
```````````````````````
::
+, -, *, /
......
......@@ -3,7 +3,7 @@ Pre-defined schemas in the library
----------------------------------
The library defines a set of entity schemas that are required by the system
or commonly used in `CubicWeb` applications.
or commonly used in *CubicWeb* applications.
Entity types used to store the schema
......
......@@ -14,7 +14,7 @@ i.e. a list of possible transitions from one state to another state.
We will define a simple workflow for a blog, with only the following
two states: `submitted` and `published`. So first, we create a simple
`CubicWeb` in ten minutes (see :ref:`BlogTenMinutes`).
*CubicWeb* in ten minutes (see :ref:`BlogFiveMinutes`).
Set-up a workflow
-----------------
......@@ -60,7 +60,7 @@ Create states, transitions and group permissions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The ``postcreate.py`` script is executed in a special environment, adding
several `CubicWeb` primitives that can be used.
several *CubicWeb* primitives that can be used.
They are all defined in the ``class ServerMigrationHelper``.
We will only discuss the methods we use to create a workflow in this example.
......@@ -131,7 +131,7 @@ Under the hood
~~~~~~~~~~~~~~
A workflow is a collection of entities of type ``State`` and of type ``Transition``
which are standard `CubicWeb` entity types.
which are standard *CubicWeb* entity types.
For instance, the following lines::
submitted = add_state(_('submitted'), 'BlogEntry', initial=True)
......
......@@ -3,10 +3,10 @@
Yams *schema*
-------------
The **schema** is the core piece of a `CubicWeb` application as it defines
The **schema** is the core piece of a *CubicWeb* application as it defines
the handled data model. It is based on entity types that are either already
defined in the `CubicWeb` standard library; or more specific types, that
`CubicWeb` expects to find in one or more Python files under the directory
defined in the *CubicWeb* standard library; or more specific types, that
*CubicWeb* expects to find in one or more Python files under the directory
`schema`.
At this point, it is important to make clear the difference between
......@@ -18,7 +18,7 @@ A relation type could have been implied if none is related to a
relation definition of the schema.
All `CubicWeb` built-in types are available : `String`, `Int`, `Float`,
All *CubicWeb* built-in types are available : `String`, `Int`, `Float`,
`Decimal`, `Boolean`, `Date`, `Datetime`, `Time`, `Interval`, `Byte`
and `Password`.
They are implicitely imported (as well as the special the function "_"
......@@ -168,7 +168,7 @@ The main principles are:
* permissions (read, update, create, delete)
* permissions are assigned to groups (and not to users)
For `CubicWeb` in particular:
For *CubicWeb* in particular:
* we associate rights at the enttities/relations schema level
* for each entity, we distinguish four kind of permissions: read,
......@@ -315,7 +315,7 @@ birth and a relation that connects a `Person` to another entity of type
`Company` through the semantic `works_for`.
The name of the Python attribute corresponds to the name of the attribute
or the relation in `CubicWeb` application.
or the relation in *CubicWeb* application.
An attribute is defined in the schema as follows::
......
......@@ -11,3 +11,4 @@ This chapter describes how you define a schema and how to make it evolves as the
baseschema
.. define-workflows
.. inheritance
......@@ -20,7 +20,7 @@ The most important method is the `execute` method of a cursor :
The `Connection` object owns the methods `commit` and `rollback`. You *should
never need to use them* during the development of the web interface based on
the `CubicWeb` framework as it determines the end of the transaction depending
the *CubicWeb* framework as it determines the end of the transaction depending
on the query execution success.
.. note::
......
......@@ -7,7 +7,7 @@ are the glue that tie views to the data model. Using them appropriately is an
essential part of the construction of well behaved cubes.
`CubicWeb` provides its own set of selectors that you can use and here is a
*CubicWeb* provides its own set of selectors that you can use and here is a
description of some of the most common used:
Of course you will write your own set of selectors as you get familiar with the
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment