2014-07-14 4 views
1

다음과 같이 등록 된 플론 (Plone) 피부 인터페이스 보내고 :얻기 만 아는 조프 3 브라우저 층의 인터페이스는 이름

<interface 
     interface=".interfaces.IThemeSpecific" 
     type="zope.publisher.interfaces.browser.IBrowserSkinType" 
     name="My Theme Name" 
     /> 

"(My Theme Name를 인터페이스 (my.app.browser.interfaces.IThemeSpecific)의 이름을 알고를 얻을 수있는 간단한 방법은 무엇입니까 ")?

답변

3

을 아마이 :

>>> from zope.component import getUtility 
>>> from zope.publisher.interfaces.browser import IBrowserSkinType 
>>> getUtility(IBrowserSkinType, name="Old Plone 3 Custom Theme") 
<InterfaceClass plonetheme.classic.browser.interfaces.IThemeSpecific> 
0

이 plone 스킨이 설치된 빌드 아웃이있는 경우 collective.recipe.omelette을 추가하면 나중에 모든 패키지에서 grep 할 수 있습니다.

그래서 이런 식으로 뭔가가 작동합니다

grep -R --include=*.zcml 'My Theme Name' parts/omelette 
+0

죄송합니다, 당신이 내 질문을 오해, 그 동적 인 방법으로, 플론 (Plone)/파이썬에서 이름을 얻기에 관하여이었다! –