doc/book/fr/20-01-intro.fr.txt
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 11 Mar 2010 19:49:40 +0100
branchstable
changeset 4872 edfc071d2659
parent 2789 39712da6f397
permissions -rw-r--r--
prepare 3.6.2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
43
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
     1
.. -*- coding: utf-8 -*-
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
     2
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
     3
Introduction à `LAX`
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
     4
====================
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
     5
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
     6
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
     7
Concepts et vocabulaire
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
     8
-----------------------
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
     9
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    10
*schéma*
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    11
  le schéma définit le modèle de données d'une application sous forme
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    12
  d'entités et de relations. C'est l'élément central d'une
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    13
  application.
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    14
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    15
*result set*
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    16
  objet encaspulant les résultats d'une requête à l'entrepôt de données
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    17
  et des informations sur cette requête.
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    18
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    19
*vue*
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    20
  une vue est une manière de représenter les données d'un `result set`
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    21
  sous forme HTML, CSV, JSON, etc.
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    22
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    23
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    24
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    25
Définition d'une application de Blog
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    26
====================================
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    27
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    28
La première chose à faire est de copier le répertoire ``lax``
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    29
vers un nouveau répertoire qui sera votre application ``Google AppEngine``::
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    30
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    31
  $ cp -r lax myapp
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    32
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    33
Définition du schéma
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    34
--------------------
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    35
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    36
Ouvrir le fichier ``myapp/schema.py`` afin de définir le schéma des
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    37
données manipulées. La syntaxe de la définition est la même que celle
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    38
proposée par `Google AppEngine` mais il faut remplacer la ligne
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    39
d'import::
2789
39712da6f397 R propagate deprecation of AppObject.entity()
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 108
diff changeset
    40
43
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    41
  from google.appengine.ext import db
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    42
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    43
par celle-ci::
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    44
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    45
  from ginco.goa import db
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    46
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    47
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    48
Un exemple de schéma de données pour un ``Blog`` pourrait être::
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    49
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    50
  from ginco.goa import db
2789
39712da6f397 R propagate deprecation of AppObject.entity()
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 108
diff changeset
    51
43
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    52
  class BlogEntry(db.Model):
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    53
      # un titre à donner à l'entrée
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    54
      title = db.StringProperty(required=True)
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    55
      # la date à laquelle le blog est créé
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    56
      diem = db.DateProperty(required=True, auto_now_add=True)
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    57
      # le contenu de l'entrée
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    58
      content = db.TextProperty()
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    59
      # une entrée peut en citer une autre
2789
39712da6f397 R propagate deprecation of AppObject.entity()
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 108
diff changeset
    60
      cites = db.SelfReferenceProperty()
39712da6f397 R propagate deprecation of AppObject.entity()
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 108
diff changeset
    61
43
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    62
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    63
Personnalisation des vues
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    64
-------------------------
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    65
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    66
`LAX` permet d'obtenir directement, à partir de la définition
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    67
du schéma, de générer des vues de consultation, d'ajout et
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    68
de modification pour tous les types de donées manipulés.
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    69
Il est toutefois généralement souhaitable de personnaliser
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    70
les vues de consultations.
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    71
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    72
Dans `LAX`, les vues sont représentées par des classes Python.
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    73
Une vue se caractèrise par :
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    74
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    75
- un identifiant (tous les objets dans `LAX` sont enregistrés
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    76
  dans un registre et cet identifiant sert de clé pour y retrouver
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    77
  la vue)
2789
39712da6f397 R propagate deprecation of AppObject.entity()
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 108
diff changeset
    78
43
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    79
- une description des types de données auxquels elle s'applique
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    80
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    81
Il existe dans `LAX` des vues prédéfinies et utilisées par le moteur
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    82
d'affichage. Pour avoir une liste exhaustive de ces vues prédéfinies,
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    83
vous pouvez consulter cette page. (XXX mettre le lien vers la liste).
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    84
Par exemple, la vue ``primary`` est la vue utilisée pour générer la
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    85
page principale de consultation d'un objet.
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    86
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    87
Par exemple, si on souhaite modifier la page principale d'une entrée de
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    88
blog, il faut surcharger la vue ``primary`` des objets ``BlogEntry`` dans
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    89
le fichier ``myapp/views.py``::
2789
39712da6f397 R propagate deprecation of AppObject.entity()
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 108
diff changeset
    90
43
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    91
  from ginco.web.views import baseviews
2789
39712da6f397 R propagate deprecation of AppObject.entity()
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 108
diff changeset
    92
43
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    93
  class BlogEntryPrimaryView(baseviews.PrimaryView):
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    94
      accepts = ('BlogEntry',)
2789
39712da6f397 R propagate deprecation of AppObject.entity()
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 108
diff changeset
    95
43
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    96
      def cell_call(self, row, col):
2789
39712da6f397 R propagate deprecation of AppObject.entity()
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 108
diff changeset
    97
          entity = self.rset.get_entity(row, col)
43
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    98
          self.w(u'<h1>%s</h1>' % entity.title)
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
    99
          self.w(u'<div>%s</div>' entity.content)
2789
39712da6f397 R propagate deprecation of AppObject.entity()
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 108
diff changeset
   100
43
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
   101
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
   102
Génération du graphique de schéma
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
   103
---------------------------------
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
   104
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
   105
Il existe une vue ``schema`` qui permet d'afficher un graphique
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
   106
représantant les différents types d'entités définis dans le schéma
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
   107
ainsi que les relations entre ces types. Ce graphique doit être généré
2789
39712da6f397 R propagate deprecation of AppObject.entity()
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 108
diff changeset
   108
statiquement. Le script à utiliser pour générer ce schéma est
43
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
   109
dans ``myapp/tools``. Ce script nécessite d'avoir accès aux
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
   110
bibliothèques fournies par le SDK de ``Google AppEngine``. Il faut
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
   111
donc modifier son PYTHONPATH::
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
   112
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
   113
  $ export PYTHONPATH=GAE_ROOT/google:GAE_ROOT/lib/yaml
2789
39712da6f397 R propagate deprecation of AppObject.entity()
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 108
diff changeset
   114
  $ python tools/generate_schema_img.py
43
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
   115
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
   116
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
   117
Génération des fichiers de traduction
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
   118
-------------------------------------
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
   119
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
   120
Des catalogues de traduction se trouvent dans `myapp/i18n`. Il faut
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
   121
pour l'instant les mettre à jour à la main (et/ou avec les outils
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
   122
``GNU`` comme ``xgettext``) et ensuite les compiler grâce au script
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
   123
``myapp/tools/i18ncompile.py``::
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
   124
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
   125
  $ export PYTHONPATH=GAE_ROOT/google:GAE_ROOT/lib/yaml
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
   126
  $ python tools/i18ncompile.py
c1a51436db9c Add references chapter and lax-book-fr but this is temporary, until content is sorted.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents:
diff changeset
   127