doc/book/en/tutorials/advanced/part04_ui-base.rst
branchstable
changeset 6923 327443ec7120
parent 6880 4be32427b2b9
child 7827 9bbf83f68bcc
--- a/doc/book/en/tutorials/advanced/part04_ui-base.rst	Fri Jan 28 23:13:47 2011 +0100
+++ b/doc/book/en/tutorials/advanced/part04_ui-base.rst	Mon Jan 31 17:24:05 2011 +0100
@@ -2,94 +2,6 @@
 ================================
 
 
-Step 0: updating code to CubicWeb 3.9 / cubicweb-file 1.9
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-CubicWeb 3.9 brings `several improvments`_ that we'll want to use, and the 1.9
-version of the file cube has a major change: the `Image` type has been dropped in
-favor of an `IImage` adapter that makes code globally much cleaner (though we wont
-see that much this here). So the first thing to do is to upgrade our cube to the
-3.9 API. As CubicWeb releases are mostly backward compatible, this is not
-mandatory but it's easier to follow change as they come than having a huge
-upgrade to do at some point. Also, this remove deprecation warnings which are a
-bit tedious...
-
-Also, since we've only a few lines of code yet, this is quite easy to upgrade.
-Actually the main thing we've to do is to upgrade our schema, to remove occurences
-of the `Image` type or replace them by the `File` type. Here is the (striped) diff:
-
-.. sourcecode:: diff
-
-     class comments(RelationDefinition):
-	 subject = 'Comment'
-    -    object = ('File', 'Image')
-    +    object = 'File'
-	 cardinality = '1*'
-	 composite = 'object'
-
-     class tags(RelationDefinition):
-	 subject = 'Tag'
-    -    object = ('File', 'Image')
-    +    object = 'File'
-
-     class displayed_on(RelationDefinition):
-	 subject = 'Person'
-    -    object = 'Image'
-    +    object = 'File'
-
-     class situated_in(RelationDefinition):
-    -    subject = 'Image'
-    +    subject = 'File'
-	 object = 'Zone'
-
-     class filed_under(RelationDefinition):
-    -    subject = ('File', 'Image')
-    +    subject = 'File'
-	 object = 'Folder'
-
-     class visibility(RelationDefinition):
-    -    subject = ('Folder', 'File', 'Image', 'Comment')
-    +    subject = ('Folder', 'File', 'Comment')
-	 object = 'String'
-	 constraints = [StaticVocabularyConstraint(('public', 'authenticated',
-						    'restricted', 'parent'))]
-
-     class may_be_readen_by(RelationDefinition):
-    -    subject = ('Folder', 'File', 'Image', 'Comment',)
-    +    subject = ('Folder', 'File', 'Comment',)
-	 object = 'CWUser'
-
-
-    -from cubes.file.schema import File, Image
-    +from cubes.file.schema import File
-
-     File.__permissions__ = VISIBILITY_PERMISSIONS
-    -Image.__permissions__ = VISIBILITY_PERMISSIONS
-
-Now, let's record that we depends on the versions in the __pkginfo__ file.  As
-`3.8`_ simplify this file, we can merge `__depends_cubes__` (as introduced if the
-`first blog of this series`_) with `__depends__` to get the following result:
-
-.. sourcecode:: python
-
-    __depends__ = {'cubicweb': '>= 3.9.0',
-		   'cubicweb-file': '>= 1.9.0',
-		   'cubicweb-folder': None,
-		   'cubicweb-person': None,
-		   'cubicweb-zone': None,
-		   'cubicweb-comment': None,
-		   'cubicweb-tag': None,
-		   }
-
-If your cube is packaged for debian, it's a good idea to update the
-`debian/control` file at the same time, so you won't forget it.
-
-That's it for the API update, CubicWeb, cubicweb-file will handle other stuff for
-us. Easy, no?
-
-We can now start some more funny stuff...
-
-
 Step 1: let's improve site's usability for our visitors
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~