이것은 this question에서 이어집니다. collective.examples.userdata 을 사용하고 사용자 등록 양식에 '위치'텍스트 필드를 추가했습니다. 내 문제는 내가/@@ 개인 정보 페이지로 가서 입력란을 채우고 '저장'을 누르면 필드가 다시 보여지고 비어있는 것입니다. 이 필드에 정보를 저장할 수없는 것으로 보입니다. 포 그라운드 모드에서 인스턴스를 실행하려고 시도했지만 새로운 정보를 저장하려고 할 때 아무 것도 출력되지 않습니다.collective.data.examples custom field will be save data
이 도움이되지만 있을지 모르겠어요나는 다음과 같은 TALES 문을 사용하게하려고하면 다음
tal:define="membership context/portal_membership;
info python:membership.getMemberInfo(user.getId());"
과 :
tal:replace="info/position"
을 나는 다음 역 추적을 얻을 :
Traceback (innermost last):
Module ZPublisher.Publish, line 126, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 46, in call_object
Module Shared.DC.Scripts.Bindings, line 322, in __call__
Module Shared.DC.Scripts.Bindings, line 359, in _bindAndExec
Module Products.PageTemplates.ZopePageTemplate, line 334, in _exec
Module Products.PageTemplates.ZopePageTemplate, line 431, in pt_render
Module Products.PageTemplates.PageTemplate, line 79, in pt_render
Module zope.pagetemplate.pagetemplate, line 113, in pt_render
Module zope.tal.talinterpreter, line 271, in __call__
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 888, in do_useMacro
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 954, in do_defineSlot
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 858, in do_defineMacro
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 954, in do_defineSlot
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 954, in do_defineSlot
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 946, in do_defineSlot
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 858, in do_defineMacro
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 620, in do_insertText_tal
Module Products.PageTemplates.Expressions, line 225, in evaluateText
Module zope.tales.tales, line 696, in evaluate
- URL: /mysite/portal_skins/custom/home_page_view
- Line 32, Column 11
- Expression: <PathExpr standard:u'info/position'>
- Names:
{'container': <PloneSite at /mysite>,
'context': <ATDocument at /mysite/front-page>,
'default': <object object at 0x7f1c681eeb30>,
'here': <ATDocument at /mysite/front-page>,
'loop': {},
'nothing': None,
'options': {'args':()},
'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x9540260>,
'request': <HTTPRequest, URL=http://dan-apache:8080/mysite/front-page/home_page_view>,
'root': <Application at >,
'template': <ZopePageTemplate at /mysite/home_page_view used for /mysite/front-page>,
'traverse_subpath': [],
'user': <PropertiedUser 'dan'>}
Module zope.tales.expressions, line 217, in __call__
Module Products.PageTemplates.Expressions, line 147, in _eval
Module zope.tales.expressions, line 124, in _eval
Module Products.PageTemplates.Expressions, line 77, in boboAwareZopeTraverse
Module zope.traversing.adapters, line 136, in traversePathElement
- __traceback_info__: ({'language': '', 'description': '', 'username': 'dan', 'has_email': False, 'location': '', 'fullname': '', 'home_page': ''}, 'position')
Module zope.traversing.adapters, line 50, in traverse
- __traceback_info__: ({'language': '', 'description': '', 'username': 'dan', 'has_email': False, 'location': '', 'fullname': '', 'home_page': ''}, 'position', [])
LocationError: ({'language': '', 'description': '', 'username': 'dan', 'has_email': False, 'location': '', 'fullname': '', 'home_page': ''}, 'position')
모든 의견을 크게 높이세요!
추적 정보는 회원 정보'dict'에'position' 키가 없다는 것을 의미합니다. –