merge
authorSylvain Thenault <sylvain.thenault@logilab.fr>
Fri, 05 Dec 2008 18:14:21 +0100
changeset 181 a57548916045
parent 180 8bcebdb5f55d (current diff)
parent 173 a4a9e1a7e40f (diff)
child 182 45a810beed18
merge
--- a/common/mixins.py	Fri Dec 05 18:09:12 2008 +0100
+++ b/common/mixins.py	Fri Dec 05 18:14:21 2008 +0100
@@ -95,6 +95,16 @@
         path.reverse()
         return path
     
+    def iterparents(self):
+        def _uptoroot(self):
+            curr = self
+            while True:
+                curr = curr.parent()
+                if curr is None:
+                    break
+                yield curr
+        return _uptoroot(self)
+
     def notification_references(self, view):
         """used to control References field of email send on notification
         for this entity. `view` is the notification view.
--- a/doc/book/en/B022-schema-definition.en.txt	Fri Dec 05 18:09:12 2008 +0100
+++ b/doc/book/en/B022-schema-definition.en.txt	Fri Dec 05 18:14:21 2008 +0100
@@ -370,3 +370,17 @@
 To compensate this problem, it is usually necessary, for such case,
 to use an action that reflects the schema permissions but which enables
 to check properly the permissions so that it would show up if necessary.
+
+
+Updating your application with your new schema
+``````````````````````````````````````````````
+
+You have to get a shell on your application ::
+
+   cubicweb-ctl shell moninstance
+
+and type ::
+
+   add_entity_type('Personne')
+
+And restart your application!
--- a/doc/book/fr/03-02-create-instance.fr.txt	Fri Dec 05 18:09:12 2008 +0100
+++ b/doc/book/fr/03-02-create-instance.fr.txt	Fri Dec 05 18:14:21 2008 +0100
@@ -48,8 +48,8 @@
   cubicweb-ctl newtemplate moncube
 
   # répondre aux questions
-  hg init moncube
   cd moncube
+  hg init 
   hg add .
   hg ci
 
@@ -65,6 +65,10 @@
 effectivement utilisables lors de la création de la base
 (import_erschema('Moncomposant') ne fonctionne pas sinon).
 
+FIXME - need example code ::
+
+  __use__ = ('blog', 'file')
+
 Création d'une instance de développement
 ========================================
 
--- a/doc/book/fr/04-02-schema-definition.fr.txt	Fri Dec 05 18:09:12 2008 +0100
+++ b/doc/book/fr/04-02-schema-definition.fr.txt	Fri Dec 05 18:14:21 2008 +0100
@@ -346,3 +346,16 @@
 nécessaire dans tel cas d'utiliser une action reflétant les droits du schéma
 mais permettant de faire la vérification correctement afin qu'elle apparaisse
 bien le cas échéant.
+
+Mise à jour du schema
+`````````````````````
+
+Il faut ensuite lancer son cubicweb en mode shell ::
+
+   cubicweb-ctl shell moninstance
+
+Et taper ::
+
+   add_entity_type('Personne')
+
+Et on relance l'application!
--- a/rset.py	Fri Dec 05 18:09:12 2008 +0100
+++ b/rset.py	Fri Dec 05 18:14:21 2008 +0100
@@ -59,10 +59,10 @@
     
     def __repr__(self):
         if not self.rows:
-            return '<empty resultset for %s>' % self.rql
+            return '<empty resultset for %r>' % self.rql
         if not self.description:
-            return '<resultset %s: %s>' % (self.rql, '\n'.join(str(r) for r in self.rows))
-        return '<resultset %s: %s>' % (self.rql,
+            return '<resultset %r: %s>' % (self.rql, '\n'.join(str(r) for r in self.rows))
+        return '<resultset %r: %s>' % (self.rql,
                                        '\n'.join('%s (%s)' % (r, d)
                                                  for r, d in zip(self.rows, self.description)))