From f3c02a6ac7bf3d74d32ac50202dc2a4ac7c333f6 Mon Sep 17 00:00:00 2001 From: helmutm Date: Sun, 22 Jan 2006 13:47:54 +0000 Subject: [PATCH] Basic setup for node schema adapters (+ some minor improvements) git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@1023 fd906abe-77d9-0310-91a1-e0d9ade77398 --- README.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.txt b/README.txt index 1cd52c2..d279e54 100755 --- a/README.txt +++ b/README.txt @@ -74,14 +74,18 @@ TODO: Work with views... Resources and what they have to do with Concepts ================================================ + >>> from loops.interfaces import IDocument, IMediaAsset + We first need a resource manager: - >>> from loops.resource import ResourceManager, Document + >>> from loops.resource import ResourceManager >>> loopsRoot['resources'] = ResourceManager() >>> resources = loopsRoot['resources'] A common type of resource is a document: + >>> from loops.interfaces import IDocument + >>> from loops.resource import Document >>> doc1 = Document(u'Zope Info') >>> resources['doc1'] = doc1 >>> doc1.title @@ -93,6 +97,7 @@ A common type of resource is a document: Another one is a media asset: + >>> from loops.interfaces import IMediaAsset >>> from loops.resource import MediaAsset >>> img = MediaAsset(u'A png Image') @@ -274,6 +279,8 @@ It is also possible to edit a target's attributes directly in an edit form provided by the node: >>> from loops.target import DocumentProxy, MediaAssetProxy + >>> ztapi.provideAdapter(INode, IDocument, DocumentProxy) + >>> ztapi.provideAdapter(INode, IMediaAsset, MediaAssetProxy) Ordering Nodes --------------