From 1572b89e8dc8d07f175150f3324716f5e82f703b Mon Sep 17 00:00:00 2001 From: helmutm Date: Sat, 3 Mar 2007 10:09:07 +0000 Subject: [PATCH] resource type handling fix: remove Document from listings git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@1608 fd906abe-77d9-0310-91a1-e0d9ade77398 --- README.txt | 3 +-- helpers.txt | 5 ++--- search/README.txt | 2 +- type.py | 3 ++- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/README.txt b/README.txt index f763a1b..1cd8060 100755 --- a/README.txt +++ b/README.txt @@ -495,8 +495,7 @@ view; these views we have to provide as multi-adapters: >>> view = ConfigureView(m111, TestRequest(form = form)) >>> sorted((t.token, t.title) for t in view.targetTypes()) [('.loops/concepts/topic', u'Topic'), ('.loops/concepts/type', u'Type'), - ('.loops/concepts/unknown', u'Unknown Type'), - ('loops.resource.Document', u'Document')] + ('.loops/concepts/unknown', u'Unknown Type')] >>> view.update() True >>> sorted(resources.keys()) diff --git a/helpers.txt b/helpers.txt index 1ff4f22..3887e5d 100755 --- a/helpers.txt +++ b/helpers.txt @@ -238,8 +238,7 @@ get a type manager from all loops objects, always with the same context: >>> sorted(t.token for t in types) ['.loops/concepts/file', '.loops/concepts/image', '.loops/concepts/predicate', '.loops/concepts/textdocument', '.loops/concepts/topic', - '.loops/concepts/type', - 'loops.resource.Document'] + '.loops/concepts/type'] >>> typeManager.getType('.loops/concepts/topic') == cc1_type True @@ -253,7 +252,7 @@ condition: >>> types = typeManager.listTypes(exclude=('concept',)) >>> sorted(t.token for t in types) ['.loops/concepts/file', '.loops/concepts/image', - '.loops/concepts/textdocument', 'loops.resource.Document'] + '.loops/concepts/textdocument'] Type-based interfaces and adapters diff --git a/search/README.txt b/search/README.txt index d4d61df..0dc1527 100755 --- a/search/README.txt +++ b/search/README.txt @@ -78,7 +78,7 @@ zcml in real life: >>> t = searchView.typesForSearch() >>> len(t) - 9 + 8 >>> t.getTermByToken('loops:resource:*').title 'Any Resource' diff --git a/type.py b/type.py index e7138bb..c54b200 100644 --- a/type.py +++ b/type.py @@ -218,7 +218,8 @@ class LoopsTypeManager(TypeManager): @property def types(self): - return self.conceptTypes() + self.resourceTypes() + return self.conceptTypes() + #return self.conceptTypes() + self.resourceTypes() def listTypes(self, include=None, exclude=None): for t in self.types: