[Archetypes-users] How to set AttachmentField ?

1 view
Skip to first unread message

SilentGab

unread,
Dec 13, 2012, 5:25:17 AM12/13/12
to archetyp...@lists.sourceforge.net
Hello everyone!

I'm trying to write a python script in my plone site that store a file
automatically in my zope db. I use at_post_create_script and i'm able to
insert all that i want into other field (Text, String, Lines, ecc..) but I
don't understand how to insert an AttachmentField with the method set.
Reading the method I saw that it needs 4 parameter: self, instance, value
and kwargs, but I didn't undestand what the last 3 parameters stand for.....
I'm using Plone 3.3.5, Python 2.4.6 and AttachmentField 1.4.4.
Can anyone help me? I'd really appreciate that!

Thank you very much for your attention!
Gabriele



--
View this message in context: http://plone.293351.n2.nabble.com/How-to-set-AttachmentField-tp7561902.html
Sent from the Archetypes mailing list archive at Nabble.com.

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Archetypes-users mailing list
Archetyp...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/archetypes-users

T. Kim Nguyen

unread,
Dec 13, 2012, 7:29:16 AM12/13/12
to SilentGab, archetyp...@lists.sourceforge.net
Have you looked at the test cases that come with Archetypes? Often I find good examples there.

Kim

SilentGab

unread,
Dec 13, 2012, 5:55:21 PM12/13/12
to archetyp...@lists.sourceforge.net
Thanks for your answer!
I've already take a look at the samples in test folder, but I haven't found
anything useful, unluckly....
I should use also other Widget or Field, the important thing is that I'll be
able to let the download of the file to my users from the view interface.



--
View this message in context: http://plone.293351.n2.nabble.com/How-to-set-AttachmentField-tp7561902p7561912.html

T. Kim Nguyen

unread,
Dec 13, 2012, 6:49:25 PM12/13/12
to SilentGab, archetyp...@lists.sourceforge.net
I'm not sure how applicable the code might be, but I like the way the ploneformgen File field works.

Kim
Reply all
Reply to author
Forward
0 new messages