{ "info": { "author": "Ales Kocjancic", "author_email": "ales.kocjancic@divio.ch", "bugtrack_url": null, "classifiers": [], "description": "=================================\n django SHOP - Multiple Currencies\n =================================\n \n This app adds support for multiple currencies to django SHOP.\n \n Warning\n =======\n \n Do not use (yet)!\n This app is still under development and might not work at all.\n \n Installation\n ============\n \n This requires django SHOP to work (https://github.com/chrisglass/django-shop)\n \n * Add `shop_multiplecurrencies` to your INSTALLED_APPS in your settings.py\n * Add `shop_multiplecurrencies.middleware.MultipleCurrenciesMiddleware` to your\n `MIDDLEWARE_CLASSES` setting\n * Add a list of currencies to the `SHOP_CURRENCIES` setting like so\n \n ::\n \n SHOP_CURRENCIES=[ # lowercase codes, please\n ['chf', 'swiss franc'],\n ['eur', 'euro'],\n ]\n \n Usage\n =====\n \n * Add a MultipleCurrenciesField to your product model\n \n ::\n \n from django.db import models\n from shop_multiplecurrencies.fields import MultipleCurrenciesField\n from shop.util.fields import CurrencyField\n \n class MyProduct(models.Model):\n # my fields ...\n price = MultipleCurrenciesField(CurrencyField)\n \n The model will in our example have two fields: `price_chf` and `price_eur`.\n \n * Extend BaseOrder with an additional field that tells us which currency the order was completed in\n \n ::\n \n from django.conf import settings\n from shop.models.defaults.bases import BaseOrder\n from shop.models.defaults.managers import OrderManager\n \n class MyOrder(BaseOrder):\n currency = models.CharField(max_length=6, choices=settings.SHOP_CURRENCIES)\n objects = OrderManager()\n \n def save(self, *args, **kwargs):\n self.currency = get_currency()\n super(MyOrder, self).save(*args, **kwargs)\n \n class Meta(object):\n abstract = False\n \n * Use the currency template filter in your templates to prefix the price with the correct currency\n \n ::\n \n {% load currency %}\n \n

This product's price is {{ price|currency }}

", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.django-shop.org/", "keywords": null, "license": "BSD License", "maintainer": null, "maintainer_email": null, "name": "django-shop-multiplecurrencies", "package_url": "https://pypi.org/project/django-shop-multiplecurrencies/", "platform": "OS Independent", "project_url": "https://pypi.org/project/django-shop-multiplecurrencies/", "project_urls": { "Homepage": "http://www.django-shop.org/" }, "release_url": "https://pypi.org/project/django-shop-multiplecurrencies/1.0.0/", "requires_dist": null, "requires_python": null, "summary": "Multiple currencies for Django Shop", "version": "1.0.0" }, "last_serial": 790604, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "9bcaaa7b802d3fb5ba525383b4316dc6", "sha256": "979a0745255149ef36c783f33881a2bebf99839354427766971809316ab79ede" }, "downloads": -1, "filename": "django-shop-multiplecurrencies-1.0.0.tar.gz", "has_sig": false, "md5_digest": "9bcaaa7b802d3fb5ba525383b4316dc6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2990, "upload_time": "2012-09-12T13:58:09", "url": "https://files.pythonhosted.org/packages/28/39/158cf0aa3468e8f6013fba3b6765329303db856594a68127df0ef443675b/django-shop-multiplecurrencies-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9bcaaa7b802d3fb5ba525383b4316dc6", "sha256": "979a0745255149ef36c783f33881a2bebf99839354427766971809316ab79ede" }, "downloads": -1, "filename": "django-shop-multiplecurrencies-1.0.0.tar.gz", "has_sig": false, "md5_digest": "9bcaaa7b802d3fb5ba525383b4316dc6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2990, "upload_time": "2012-09-12T13:58:09", "url": "https://files.pythonhosted.org/packages/28/39/158cf0aa3468e8f6013fba3b6765329303db856594a68127df0ef443675b/django-shop-multiplecurrencies-1.0.0.tar.gz" } ] }