Re: getImage method inside ATFile
Héctor Velarde <[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.devel |
|---|---|
| Message-ID | <[email protected]> |
On 12-08-2013 22:42, David Glick (Plone) wrote:
> Well maybe you can try my suggestion after some sleep. :)
I had some sleep and this is what I finally got:
if hasattr(obj, 'image'): # Dexterity
return True
elif hasattr(obj, 'Schema'): # Archetypes
return 'image' in obj.Schema().keys()
else:
return False
it seems to be working, thanks! :-)
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
Plone-developers mailing list
Plone-developers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/plone-developers
smime.p7s
(application/pkcs7-signature, 3.7 KB) - not displayed