doc/book/en/B0012-schema-definition.en.txt
changeset 1205 79d33f7db590
parent 1164 88834894d2d7
child 1222 0d5035525a23
equal deleted inserted replaced
1204:79c80b5e71e6 1205:79d33f7db590
   146   that it does not express a "strong" constraint, which means it is only used to
   146   that it does not express a "strong" constraint, which means it is only used to
   147   restrict the values listed in the drop-down menu of editing form, but it does
   147   restrict the values listed in the drop-down menu of editing form, but it does
   148   not prevent another entity to be selected.
   148   not prevent another entity to be selected.
   149 
   149 
   150 
   150 
   151 Relation definition
   151 Definition of relations
   152 -------------------
   152 -----------------------
   153 
   153 
   154 XXX add note about defining relation type / definition
   154 XXX add note about defining relation type / definition
   155 
   155 
   156 A relation is defined by a Python class heriting `RelationType`. The name
   156 A relation is defined by a Python class heriting `RelationType`. The name
   157 of the class corresponds to the name of the type. The class then contains
   157 of the class corresponds to the name of the type. The class then contains
   219 
   219 
   220   
   220   
   221 Permissions definition
   221 Permissions definition
   222 ``````````````````````
   222 ``````````````````````
   223 
   223 
   224 Define permissions is set through to the attribute `permissions` of entities and
   224 Setting permissions is done with the attribute `permissions` of entities and
   225 relations types. It defines a dictionnary where the keys are the access types
   225 relation types. It defines a dictionnary where the keys are the access types
   226 (action), and the values are the authorized groups or expressions.
   226 (action), and the values are the authorized groups or expressions.
   227 
   227 
   228 For an entity type, the possible actions are `read`, `add`, `update` and
   228 For an entity type, the possible actions are `read`, `add`, `update` and
   229 `delete`.
   229 `delete`.
   230 
   230 
   375 
   375 
   376 
   376 
   377 Updating your application with your new schema
   377 Updating your application with your new schema
   378 ``````````````````````````````````````````````
   378 ``````````````````````````````````````````````
   379 
   379 
   380 If you modified your schema, the update is not automatic; this is 
   380 If you modified your schema, the update is not automatic; indeed, this is 
   381 indeed in general not a good idea.
   381 in general not a good idea.
   382 Instead, we call a shell on  your application, which is a 
   382 Instead, you call a shell on your application, which is a 
   383 an interactive python shell, with an appropriate
   383 an interactive python shell, with an appropriate
   384 cubicweb environment ::
   384 cubicweb environment ::
   385 
   385 
   386    cubicweb-ctl shell myinstance
   386    cubicweb-ctl shell myinstance
   387 
   387