currency.converter package fetches currency rate data from European Central Bank for about recent 3 months. Once the data is fetched, the data is persisted in ZODB in case of whatever difficulty to fetch the data again. There are currency converter page and portlet included in this package and several methods you can use for your own applications.
Log in as a manager and go to the page, “your_portal/@@manage-currency”. By visiting the page, the current currency data will be fetched if possible and automatically persisted.
Site manager can give two different variables in addition to currencies, days and margin.
- This amout is used to caclulate average of currencies. For example, if you input 10 to this field, 10 recent days are used to calculate average currency rate. This keeps currency rate fluctuation smaller than using everyday plain rate. If nothing or 0 is input there, it doesn’t calculate average, but uses current rate.
- Margin adds % of rate to the currency rate. 0 is 0 % margin where is no margin.
- Currency code and name vocabulary added.
- Initial release
If you are using zc.buildout and the plone.recipe.zope2instance recipe to manage your project, just do this:
Add currency.converter to the list of eggs to install, e.g.:[buildout]eggs =currency.converter
Tell the plone.recipe.zope2instance recipe to install a ZCML slug:[instance]recipe = plone.recipe.zope2instancezcml =currency.converter
Re-run buildout, e.g. with:$ ./bin/buildout
Setting Time Server
To fetch the currency data regularly like every day, describe to the instance section of buildout.cfg the next way.
[instance]zope-conf-additional =<clock-server>method /your_portal/@@manage-currencyperiod 86400user adminpassword admin_passhost localhost</clock-server>
- Change your_portal to your plone site id
- Period is seconds between eache fetch of the currency data. 86400 seconds are the 24 hour. The data is usually updated daily on week days.
- Describe admin name to admin and its password to admin_pass.
- host is host name of your server.
When you reinstall or upgrade to new version, the persisted data is not migrated to new environment, so please visit your_portal/@@manage-currency after reinstall or upgrade to get the current data or if you have set the time server, you can wait till the server fetches those values for you.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size currency.converter-0.4.2_-py2.4.egg (62.7 kB)||File type Egg||Python version 2.4||Upload date||Hashes View|
|Filename, size currency.converter-0.4.2-.tar.gz (30.2 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for currency.converter-0.4.2_-py2.4.egg
Hashes for currency.converter-0.4.2-.tar.gz