{ "info": { "author": "Richard Case", "author_email": "rich@racitup.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Application Frameworks" ], "description": "djangoshop-currencies\n=====================\n\nDjango-SHOP integration with `django-currencies `__\n\nIntroduction\n------------\n\nThis module allows Django-SHOP implementations to integrate live\ncurrency feeds. This will allow you to offer your shop product prices\nin the user's chosen currency.\n\nThe module is currently compatible with Django v1.10.7. This\ndocumentation assumes a working knowledge of Django and\n`Django-SHOP `__.\n\nRelease History\n~~~~~~~~~~~~~~~\n\n- 0.2.x - `Django-SHOP `__ v0.11.x compatibility\n- 0.1.x - `Django-SHOP `__ v0.10.2 compatibility\n\nTODO\n~~~~\n\nPlease let me know of you have any feature suggestions, or wish to\nimplement any of the below:\n\n- Fix for the db initialisation warning below.\n- Tests.\n- Continuous build integration including compatibility testing with\n various python, Django and Django-SHOP versions.\n\nConfiguration\n-------------\n\nFollow the Readme for `django-currencies `__.\nInstall this module through pip: ``pip install djangoshop-currencies``.\n\nThe Django-SHOP Money system has been extended to use django-currencies as a currency conversion backend.\nTo enable this functionality your currencies configuration must satisfy the following requirements:\n\n1. ISO4217Exponent and symbol populating using ``./manage.py currencies iso``\n (This automatically imports the currencies set in the ``SHOP_CURRENCIES`` setting)\n2. Currency factors populating using ``./manage.py updatecurrencies yahoo``\n (This also sets the base currency to ``SHOP_DEFAULT_CURRENCY``)\n3. Some currencies set to active in the admin interface\n\n.. topic:: Warning\n\n The *currencies* database table **must** be initialised before any Django app can import the included money types.\n Unfortunately the ``./manage.py`` command will automatically import a lot of modules when they are configured in\n INSTALLED_APPS causing an error which prevents you from running ``./manage.py migrate``, etc.\n\n As a workaround before a permanent solution is found:\n\n 1. Create a minimal settings file which will be used temporarily to allow the currencies table of your database to be populated. As an example, `one is included here `_.\n 2. Run ``python manage.py migrate --settings shop_currencies.min_settings`` (or use your minimal settings file)\n 3. Satisfy requirements 1. & 2. above & append ``--settings `` to the commands\n 4. Run ``python manage.py migrate``\n 5. Run ``python manage.py createsuperuser`` to create an admin user\n 6. Satisfy requirement 3. above\n\n Once created, I recommend dumping your base currency as a fixture for subsequent use when initialising databases:\n\n .. code-block:: shell\n\n python manage.py dumpdata --indent 2 --output fixtures/currency.json --pks 1 currencies.currency\n python manage.py loaddata --settings shop_currencies.min_settings fixtures/currency.json\n\nUsage\n~~~~~\n\nReplace the ``DefaultCartModifier`` with the provided ``CurrencyCartModifier``\nin your shop settings:\n\n.. code-block:: python\n\n SHOP_CART_MODIFIERS = (\n # provides the default cart lines\n 'shop_currencies.modifiers.CurrencyCartModifier',\n ...\n\nUse the Money conversion extension which provides the ``to(code)`` function as below.\nThe additional ``base`` argument is used by the cart modifier.\n\n.. code-block:: python\n\n from django.db import models\n from currencies.utils import get_currency_code\n from shop_currencies.money.fields import MoneyField\n\n class MyModel(models.Model):\n unit_price = MoneyField()\n ...\n\n def get_price(self, request, base=False):\n if base:\n return self.unit_price\n else:\n session_currency_code = get_currency_code(request)\n return self.unit_price.to(session_currency_code)", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/racitup/djangoshop-currencies", "keywords": "Django,Django-SHOP", "license": "BSD License", "maintainer": "", "maintainer_email": "", "name": "djangoshop-currencies", "package_url": "https://pypi.org/project/djangoshop-currencies/", "platform": "OS Independent", "project_url": "https://pypi.org/project/djangoshop-currencies/", "project_urls": { "Homepage": "https://github.com/racitup/djangoshop-currencies" }, "release_url": "https://pypi.org/project/djangoshop-currencies/0.2.0/", "requires_dist": null, "requires_python": "", "summary": "Django-SHOP integration with django-currencies", "version": "0.2.0" }, "last_serial": 3224051, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "f6cdb03042133ae786f414351b2d4351", "sha256": "e9c4a69af462f2edab1d11f38b59f31be4dedc523fc2f42c2de2ad21a9e5c04c" }, "downloads": -1, "filename": "djangoshop-currencies-0.1.0.tar.gz", "has_sig": false, "md5_digest": "f6cdb03042133ae786f414351b2d4351", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6027, "upload_time": "2017-07-28T17:49:25", "url": "https://files.pythonhosted.org/packages/92/af/c6dea7c08cc5f3a49a5ad2095372538db43d70d1d90b4ffe3d575e211e9f/djangoshop-currencies-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "205a68364af9f57d6ea335449638d5d4", "sha256": "fa8cc4dd225532a0d7de92e11b5525fea0e224601753edc8ad989b88ae1d2cd1" }, "downloads": -1, "filename": "djangoshop-currencies-0.2.0.tar.gz", "has_sig": false, "md5_digest": "205a68364af9f57d6ea335449638d5d4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7004, "upload_time": "2017-10-04T04:40:35", "url": "https://files.pythonhosted.org/packages/ad/cf/b64e68f752e27657ea56601dd9731b94f77002790ede668b12f3143d93f2/djangoshop-currencies-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "205a68364af9f57d6ea335449638d5d4", "sha256": "fa8cc4dd225532a0d7de92e11b5525fea0e224601753edc8ad989b88ae1d2cd1" }, "downloads": -1, "filename": "djangoshop-currencies-0.2.0.tar.gz", "has_sig": false, "md5_digest": "205a68364af9f57d6ea335449638d5d4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7004, "upload_time": "2017-10-04T04:40:35", "url": "https://files.pythonhosted.org/packages/ad/cf/b64e68f752e27657ea56601dd9731b94f77002790ede668b12f3143d93f2/djangoshop-currencies-0.2.0.tar.gz" } ] }