Re-building loops package as a 'concept management framework' - basically running again
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@810 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
7a0a2e2790
commit
ae863e1008
2 changed files with 8 additions and 7 deletions
|
@ -25,6 +25,7 @@ $Id$
|
|||
from zope.app import zapi
|
||||
from zope.app.dublincore.interfaces import ICMFDublinCore
|
||||
from zope.security.proxy import removeSecurityProxy
|
||||
from cybertools.relation import DyadicRelation
|
||||
|
||||
from loops.interfaces import IConcept
|
||||
|
||||
|
@ -40,13 +41,12 @@ class Details(object):
|
|||
|
||||
class ConceptRelations(Details):
|
||||
|
||||
def assignSubtask(self):
|
||||
""" Add a subtask denoted by the path given in the
|
||||
request variable subtaskPath.
|
||||
def assignConcept(self, concept_name):
|
||||
""" Assign a concept denoted with the name.
|
||||
"""
|
||||
conceptName = self.request.get('concept_name')
|
||||
#conceptName = self.request.get('concept_name')
|
||||
#if conceptName:
|
||||
concept = zapi.getParent(self.context)[conceptName]
|
||||
concept = zapi.getParent(self.context)[concept_name]
|
||||
#if concept:
|
||||
self.context.assignConcept(removeSecurityProxy(concept))
|
||||
self.context.assignConcept(removeSecurityProxy(concept), DyadicRelation)
|
||||
self.request.response.redirect('.')
|
||||
|
|
|
@ -23,6 +23,7 @@ $Id$
|
|||
"""
|
||||
|
||||
from zope.app import zapi
|
||||
from zope.app.container.contained import Contained
|
||||
from zope.interface import implements
|
||||
from persistent import Persistent
|
||||
|
||||
|
@ -32,7 +33,7 @@ from cybertools.relation import DyadicRelation
|
|||
from interfaces import IConcept
|
||||
|
||||
|
||||
class Concept(Persistent):
|
||||
class Concept(Persistent, Contained):
|
||||
|
||||
implements(IConcept)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue