# HG changeset patch # User Nicolas Chauvat # Date 1248350956 -7200 # Node ID 576f4d51f826d9c7dfc69bd08a8a24146d2dfb36 # Parent 1d46c016a564633551ed71e786f3569072bd151e [cleanup] fix deprecation warnings diff -r 1d46c016a564 -r 576f4d51f826 schemas/base.py --- a/schemas/base.py Thu Jul 23 13:03:50 2009 +0200 +++ b/schemas/base.py Thu Jul 23 14:09:16 2009 +0200 @@ -102,7 +102,7 @@ # 0..n cardinality for entities created by internal session (no attached user) # and to support later deletion of a user which has created some entities cardinality = '**' - subject = '**' + subject = '*' object = 'CWUser' class created_by(RelationType): @@ -115,20 +115,20 @@ # 0..1 cardinality for entities created by internal session (no attached user) # and to support later deletion of a user which has created some entities cardinality = '?*' - subject = '**' + subject = '*' object = 'CWUser' class creation_date(RelationType): """creation time of an entity""" cardinality = '11' - subject = '**' + subject = '*' object = 'Datetime' class modification_date(RelationType): """latest modification time of an entity""" cardinality = '11' - subject = '**' + subject = '*' object = 'Datetime' diff -r 1d46c016a564 -r 576f4d51f826 schemas/bootstrap.py --- a/schemas/bootstrap.py Thu Jul 23 13:03:50 2009 +0200 +++ b/schemas/bootstrap.py Thu Jul 23 14:09:16 2009 +0200 @@ -233,7 +233,7 @@ 'delete': (), } cardinality = '1*' - subject = '**' + subject = '*' object = 'CWEType' class is_instance_of(RelationType): @@ -248,7 +248,7 @@ 'delete': (), } cardinality = '+*' - subject = '**' + subject = '*' object = 'CWEType' class specializes(RelationType): diff -r 1d46c016a564 -r 576f4d51f826 web/test/data/schema/testschema.py --- a/web/test/data/schema/testschema.py Thu Jul 23 13:03:50 2009 +0200 +++ b/web/test/data/schema/testschema.py Thu Jul 23 14:09:16 2009 +0200 @@ -5,6 +5,11 @@ :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr :license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses """ + +from yams.buildobjs import (EntityType, RelationDefinition, RelationType, String, + Int, SubjectRelation) +from yams.constraints import IntervalBoundConstraint + class Salesterm(EntityType): described_by_test = SubjectRelation('File', cardinality='1*', composite='subject') amount = Int(constraints=[IntervalBoundConstraint(0, 100)]) diff -r 1d46c016a564 -r 576f4d51f826 web/views/workflow.py --- a/web/views/workflow.py Thu Jul 23 13:03:50 2009 +0200 +++ b/web/views/workflow.py Thu Jul 23 14:09:16 2009 +0200 @@ -18,6 +18,7 @@ from cubicweb.selectors import (implements, has_related_entities, relation_possible, match_form_params) from cubicweb.interfaces import IWorkflowable +from cubicweb.view import EntityView from cubicweb.web import stdmsgs, action, component, form from cubicweb.web.form import FormViewMixIn from cubicweb.web.formfields import StringField, RichTextField