[Zope-DB] Exporting portal member data to csv
Win Myint Aung
wma108 at yahoo.com
Mon Feb 26 22:43:11 EST 2007
When i run the external method in plone site, it shows errors.
The error shows.
Site Error
An error was encountered while publishing this resource.
Error Type: AttributeError
Error Value: portal_memberdata
The following is the codings used in external methon.
# make heading row
row = makeRow()
row[0] = 'member_id'
row[1] = 'password'
writer.writerow(row)
for member in self.portal_membership.listMembers():
# make row for each member full of blank values
row = makeRow()
member_id = member.getId()
user = acl_users.getUser(name=member_id)
password = user._getPassword()
row[0] = member_id
row[1] = password
writer.writerow(row)
request.RESPONSE.setHeader('Content-Type','application/csv')
request.RESPONSE.setHeader('Content-Length',len(text.getvalue()))
request.RESPONSE.setHeader('Content-Disposition','inline;filename=%smembers.csv' %
time.strftime("%Y%m%d-%H%M%S-",time.localtime()))
return text.getvalue()
____________________________________________________________________________________
No need to miss a message. Get email on-the-go
with Yahoo! Mail for Mobile. Get started.
http://mobile.yahoo.com/mail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope-db/attachments/20070226/9ac55de4/attachment.htm
More information about the Zope-DB
mailing list