{ "info": { "author": "Mike Jarrrett (originally Monwara LLC)", "author_email": "mike.d.jarrett@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License" ], "description": "====================\ndjango-international\n====================\n\ndjango-international is a combination of data, models, and forms, for handling\ncountry- and currency-related information in your Django_ project. The data\nused in this app comes from Wikipedia_ and XE.com_, and will be updated from\ntime to time when sources become updated.\n\nLanguage name data is acquired from babel_ if babel is installed.\n\n.. contents::\n\ninternational.models.COUNTRIES_RAW\n==================================\n\nThis is a tuple of tuples in the following format::\n\n COUNTRIES_RAW = (\n (CO, CC, CNT, NUM, FN),\n ...\n )\n\n*CO* is the two-letter continent code. *CC* is the country code as per ISO\n3166-1 standard. *CNT* is the 3-letter code as per ISO 3166-1 standard. *NUM*\nis the three-digit code as per ISO-3166-1 standard. *FN* is the full name of\nthe country as a translatable string (wrapped in\n``django.util.translation.ugettext``).\n\nThis tuple is processed at runtime to derive the choices-compatible tuple.\n\nPlease note that some country names were modified and that the choices tuple\nwill omit anything that appears in brackets compared to the original list on\nWikipedia_.\n\ninternational.models.COUNTRIES\n==============================\n\nThis is a tuple of tuples compatible with ``choices`` argument passed to\nDjango's model/form fields. The values are 2-letter country codes, and display\nvalues are full country names without the parts that appear in brackets.\n\nThis tuple is also used as choices argument in the country form if\n``use_static`` argument is passed to the constructor, or\n``COUNTRY_FORM_USE_STATIC`` configuration setting is set to ``True``.\n\ninternational.models.CURRENCIES\n===============================\n\nThis is atuple of tuples compatible with ``choices`` argument passed to\nDjango's model/form fields. The values are ISO 4217 3-letter currency codes,\nand display values are the same codes with full currency names. For example::\n\n ('USD', 'USD - United States Dollar')\n\nThis tuple is used as ``choices`` argument for the ``ChoicesField`` in the\ncurrency form.\n\ninternational.models.LANGUAGES\n==============================\n\nThis list provides a list of choices-compatible tuples that pair locale\nidentifiers (e.g., ``'en_US'``) with both native and English language names of\nthe language. For languages whose native names are in English, no translation\nis used. E.g.::\n\n jp \u65e5\u672c\u8a9e (Japanese)\n en_US U.S. English\n\nThis list is empty if babel is not installed, but having babel installed is\n*not* a requirement if you do not need language lists.\n\ninternationa.models.LANGUAGES_NATIVE\n====================================\n\nSame as ``international.models.langauges`` but using only native version of the\nname as label. As with other language lists, this list is only populated if\nbabel is installed.\n\ninternational.models.LANGUAGES_ENGLISH\n======================================\n\nSame as ``international.models.langauges`` but using only English version of\nthe name as label. AS with other language lists, this is only populated if\nbabel is installed.\n\ninternational.models.Country\n============================\n\nThe ``models`` module contains a ``Country`` model. It is a full model (not\nabstract) and it is meant to be linked to from your other modules via foreign\nkeys.\n\nCountry.code\n------------\n\nThis field contains 2-letter ISO code for your country as per ISO 3166-1 alpha\n2 standard. The field is constrained by choices which allows a full set of\ncountries found on Wikipedia_. There is currently no way of restricting the\nchoices with configuration settings.\n\nThe full names of countries are translatable strings, and can be displayed by\nusing the standard Django API for display names::\n\n >>> c = Country(code='AR', continent='SA')\n >>> c.get_code_display()\n u'Argentina'\n\nCountry.continent\n-----------------\n\nThis field contains two-letter codes for continents as per Wikipedia_. These\nare restricted to:\n\n+ *AF* -- Africa\n+ *AS* -- Asia\n+ *EU* -- Europe\n+ *NA* -- North America\n+ *SA* -- South America\n+ *OC* -- Oceania\n+ *AN* -- Antarctica\n\nThe full names are translatable, and can be obtained using Django's standard\ndisplay name API::\n\n >>> c = Country(code='AR', continent='SA')\n >>> c.get_continent_display()\n u'South America'\n\ninternational.forms.CountryForm\n===============================\n\nThe constructor is invoked usual form arguments and some additional arguments::\n\n CountryForm(*arg,\n use_static=False,\n include_empty=False,\n empty_value='',\n empty_label='All countries',\n **kwarg)\n\nThis is a simple form with a single ``ChoiceField`` field called ``country``.\nIt is marked as optional, has a translatable label that reads 'country', and\nhas empty string as initial value.\n\nSome aspects of this form can be controlled using configuration settings or\nconstructor arguments. Any arguments that a standard Django form accepts are\nalso acceptable (e.g., ``initial`` or ``data``). Note that constructor\narguments always take precedence over settings.\n\nFollowing sections describe available configuration settings and matching\nconstructor arguments.\n\n``COUNTRY_FORM_USE_STATIC`` or ``use_static``\n These options control whether to use the ``COUNTRIES`` tuple or use\n existing countries from the ``Country`` model as choices for the field. If\n the model objects are used, they are read from the database each time the\n form is initialized. There is currently no caching involved.\n\n``COUNTRY_FORM_INCLUDE_EMPTY`` or ``include_empty``\n Whether to include an 'empty' item in the choices. This can be treated as a\n ``None`` value in the views, depending on your needs. If set to ``True``, a\n single two-tuple will be prepended to the choices tuple that uses empty\n value specified by ``COUNTRY_FORM_EMPTY_VALUE`` setting or the\n ``empty_value`` constructor argument, and label matching the\n ``COUNTRY_FORM_EMPTY_LABEL`` setting or ``empty_label`` constructor\n argument.\n\n``COUNTRY_FORM_EMPTY_VALUE`` or ``empty_value``\n The value to use as empty. Defaults to empty string.\n\n``COUNTRY_FORM_EMPTY_LABEL`` or ``empty_label``\n Value to use as display value for the empty item. Default to a translatable\n string 'All countries'.\n\ninternational.forms.CurrencyForm\n================================\n\nJust like ``CountryForm`` (q.v., international.forms.CountryForm_),\n``CurrencyForm`` can be invoked with additional arguments::\n\n CurrencyForm(*arg,\n include_empty=False,\n empty_value='',\n empty_label='All currencies',\n **kwarg)\n\n\nSimple form with a simple ``ChoiceField`` field called ``currency``. It uses\nthe ``CURRENCIES`` tuple as choices argument.\n\nThis form has similar configuration parameters as the ``CountryForm`` form.\n\n``CURRENCY_FORM_INCLUDE_EMPTY`` or ``include_empty``\n Whether to include an empty item in the choices. The value and label of the\n empty item are controlled via the ``CURRENCY_FORM_EMPTY_VALUE`` and\n ``CURRENCY_FORM_EMPTY_LABEL`` settings, or the ``empty_value`` and\n ``empty_label`` constructor arguments.\n\n``CURRENCY_FORM_EMPTY_VALUE`` or ``empty_value``\n Controls the empty item's value. Defaults to ''.\n\n``CURRENCY_FORM_EMPTY_LABEL`` or ``empty_label``\n Controls the label used for the empty item. Defaults to a translatable string\n 'All currencies'.\n\ninternational.forms.CountryCurrencyForm\n=======================================\n\nThis is an experimental feature that combines both the ``CountryForm`` and\n``CurrencyForm`` into a single form. This form is governed by both sets of\nsettings and constructor arguments that apply to either of the simple forms.\n\nThis feature hsan't been tested thoroughly (especially the constructor\narguments), but it is known to work as expected with configuration settings.\n\nAlso see international.forms.CountryForm_ and international.forms.CurrencyForm_\nfor more information.\n\nFixtures\n========\n\nThe ``international/fixtures/`` directory contains a set of fixtures that can\nbe loaded using the ``loaddata`` management command. The fixtures are generated\nbased on ``COUNTRIES_RAW`` tuple, and contains the data for the ``Country``\nmodel. It is intentionally not the initial data fixture, since the purpose of\nthe ``Country`` model is to create an editable list of countries, and not have\nthem hard-coded. Initial data fixture would overwrite the data each time\n``syncdb`` command is used, so it would effectively invalidate the very purpose\nof the model.\n\nContributors\n============\n\n+ Branko Vukelic (https://bitbucket.org/dkaufhold/)\n+ Theo Chatzimichos (https://bitbucket.org/tampakrap)\n\nReporting bugs\n==============\n\nBugs can be reported to Bitbucket `issue tracker`_.\n\n.. _Django: http://www.djangoproject.com/\n.. _Wikipedia: http://en.wikipedia.org/wiki/List_of_countries_by_continent_%28data_file%29\n.. _XE.com: http://www.xe.com/iso4217.php\n.. _babel: http://babel.edgewall.org/\n.. _issue tracker: https://github.com/mikejarrett/django-internationalizer/issues", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://www.github.com/mikejarrett/django-internationalizer", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "django-internationalizer", "package_url": "https://pypi.org/project/django-internationalizer/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-internationalizer/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://www.github.com/mikejarrett/django-internationalizer" }, "release_url": "https://pypi.org/project/django-internationalizer/0.0.1/", "requires_dist": null, "requires_python": null, "summary": "Country and currency data for Django projects", "version": "0.0.1" }, "last_serial": 1908234, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "c91557c3928b40b849fff20f4b3926ab", "sha256": "e212bac4a42c64e4bb4613757a866032d1fdbf0147367e5f224318b3f95e600b" }, "downloads": -1, "filename": "django-internationalizer-0.0.1.tar.gz", "has_sig": false, "md5_digest": "c91557c3928b40b849fff20f4b3926ab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19356, "upload_time": "2016-01-17T09:55:05", "url": "https://files.pythonhosted.org/packages/59/cf/880b30b9527954958d2ede50015672b496ad8c8ed9df2c52b2aaa90ec7d9/django-internationalizer-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c91557c3928b40b849fff20f4b3926ab", "sha256": "e212bac4a42c64e4bb4613757a866032d1fdbf0147367e5f224318b3f95e600b" }, "downloads": -1, "filename": "django-internationalizer-0.0.1.tar.gz", "has_sig": false, "md5_digest": "c91557c3928b40b849fff20f4b3926ab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19356, "upload_time": "2016-01-17T09:55:05", "url": "https://files.pythonhosted.org/packages/59/cf/880b30b9527954958d2ede50015672b496ad8c8ed9df2c52b2aaa90ec7d9/django-internationalizer-0.0.1.tar.gz" } ] }