[schema] use explicit imports in schema declaration
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Mon, 27 Jul 2009 08:33:09 +0200
changeset 22 838ad9dc61ef
parent 21 270a76e20b93
child 23 6a6a97aba6cf
[schema] use explicit imports in schema declaration
schema.py
--- a/schema.py	Mon Jul 06 17:17:06 2009 +0200
+++ b/schema.py	Mon Jul 27 08:33:09 2009 +0200
@@ -1,4 +1,7 @@
 # template's specific schema
-Expense = import_erschema('Expense')
-Expense.add_relation(SubjectRelation('Workcase', cardinality='?*'), name='spent_for')
+from yams.buildobjs import SubjectRelation
 
+from cubes.expense.schema import Expense
+
+Expense.add_relation(SubjectRelation('Workcase', cardinality='?*'),
+                     name='spent_for')