On Wed, Mar 4, 2009 at 3:49 PM, Rodrigo Ristow rodr...@webristow.com.br wrote:
Tem alguem com experiência em plone relations?
estou meio desesperado com o problema abaixo, teria alguem pra dar uma
força?
Falta registrar um adapter para provenha a interface
IRelationshipSource para objetos Archetypes.
Eu nunca usei o produto plonerelations.atfield mas acho que algo na
configuração do ambientes está com problema, seria bom ler a
documentação desse produto.
Att,
Obrigado
skype: ristow
msn: rodrigo.ris...@bol.com.br
I'm haveîng a BIG problem with relationship. After a reinstall
(quick_installer) of an product,
I'm receving the error: 'Could not adapt' bellow. I know what is the
problem, the object Publication don't
have the interface IRelationshipSource. But i don't know how to fix it
properly.
I'll apreciate some help
Error:
c:\zope\bibliosa\src\plonerelations.atfield\plonerelations\atfield\plonerelationsatfield.py(40)get()
- res =
IRelationshipSource(instance).getTargets(relation=self.relationship)
(Pdb) l
35 security.declarePrivate('get')
36 def get(self, instance, aslist=False, **kwargs):
37 get() returns the list of objects referenced under the relationship
38
39 import pdb; pdb.set_trace()
40 - res =
IRelationshipSource(instance).getTargets(relation=self.relationship)
41
42 # singlevalued ref fields return only the object, not a list,
43 # unless explicitely specified by the aslist option
44
45 if not self.multiValued:
(...)
2009-03-04 18:06:12 ERROR Zope.SiteErrorLog http://localhost:8681/test
Traceback (innermost last):
Module ZPublisher.Publish, line 119, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 42, in call_object
Module Shared.DC.Scripts.Bindings, line 313, in __call__
Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
Module Products.PythonScripts.PythonScript, line 327, in _exec
Module None, line 12, in test
- PythonScript at /test
- Line 12
Module Products.bibliosa.content.publication, line 152, in getAuthors
Module Products.Archetypes.ClassGen, line 56, in generatedAccessor
Module plonerelations.ATField._field, line 81, in get
Module plonerelations.ATField.ploneRelationsATField, line 40, in get
TypeError: ('Could not adapt', Publication at
/ppt/content/pub/forschungslandschaft-soziale-arbeit-schweiz,
InterfaceClass plone.app.relations.interfaces.IRelationshipSource)
--
Class Information:
from Products.LinguaPlone.public import BaseFolder
class Publication(BibliosaContentMixin, BaseFolder):
A publication with a variable schema
security = ClassSecurityInfo()
implements(IPublication)
# This name appears in the 'add' box
archetype_name = meta_type = portal_type = TYPENAME
schema = PUBLICATIONSCHEMA
inactive = PersistentDict()
(...)
class BibliosaContentMixin(object):
Base class for all bibliosa content classes
Collects methods and variables shared by all
content types.
immediate_view = 'base_view'
default_view = 'base_view'
_at_rename_after_creation = True
implements(IAttributeAnnotatable)
(...)
class IPublication(Interface):
A publication
--
=
Rudá Porto Filgueiras
Weimar Consultoria
http://python-blog.blogspot.com
Hospedagem Plone, Django, Zope 3, Grok...
http://www.pytown.com
=