You are here: Home Plone My Python Scripts Return Quota
Search
Advanced Search…
E-Mail

Webmail: webmail.wyden.com

E-Mail Preferences: postfix.wyden.com/users

E-Mail Administration: postfix.wyden.com

Statistics
Total: 463
Total Pages: 284
Total Folders: 87
Total Files: 18
Total Links: 26
Last modification: 03.02.2012 16:00
 

Return Quota

by Wyden Silvan last modified 12.12.2009 11:42

You must have installed QuotaFolder!

mysize = float(context.current_size())
myquota = float(context.quota_bytes())

return str(int(mysize/1000000)) + 'MB/' + str(int(myquota/1000000)) + 'MB' + '(' + str(int(mysize/myquota*100)) + '%)'