[Zope3-Users] Confirming member generated objects?
Maken Seteva
crapkonto at gmail.com
Mon Sep 3 17:59:09 EDT 2007
Hi!
In many applications members can add content but with the restriction
that it needs to be confirmed
by a manager before it becomes "active" and accessible to anybody
else. I'm trying to accomplish this
with an idea of mine, but I'm very open to other ideas of course :)
Basically, lets say I have a site 'mysite'
and an item container 'items'. And an Item is the content component
of my app. When people add items in
/mysite/items/+/ztest.Item
... my idea is that it is then actually only added e.g in an
'unconfirmed' folder in the site manager of mysite.
This, I'm trying to achieve by subclassing AddForm and overriding the
add method (since add is the only
interesting here, the rest is dotted in the code below:)):
#------------------------------------
class ItemMemberAddForm(AddForm):
form_fields = ...
label = ...
def create(self, data):
...
def add(self, object):
con = queryUtility(IItemContainer, u'unconfirmed')
o = IAdding(con).add
(object) # How to add it??
self._finished_add = True
return o
#------------------------------------
The 'unconfirmed' folder is registered as a utility for easy access.
Obviously the code above isn't working
and i'm not even sure I know what I'm doing with the IAdding :O
I think I'm in the difficult phase of the Z-learning curve... just
learnt the basics and now anything beyond the
basics seem really complicated :)
When I do manage to pull this off, it shouldn't be too hard moving
confirmed objects to /mysite/items (I looked
at zope.copypastemove for this, but first I want to get the adding
working..)
Any thoughts on my idea/code or any other things related to
confirming member generated content are very
much appreciated!
Regards
Seteva
More information about the Zope3-users
mailing list