django-localized-fields


Namedjango-localized-fields JSON
Version 6.7 PyPI version JSON
download
home_pagehttps://github.com/SectorLabs/django-localized-fields
SummaryImplementation of localized model fields using PostgreSQL HStore fields.
upload_time2023-08-10 12:44:49
maintainer
docs_urlNone
authorSector Labs
requires_python>=3.6
licenseMIT License
keywords django localized language models fields postgres hstore i18n
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            |  |  |  |
|--------------------|---------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| :white_check_mark: | **Tests** | [![CircleCI](https://circleci.com/gh/SectorLabs/django-localized-fields/tree/master.svg?style=svg)](https://circleci.com/gh/SectorLabs/django-localized-fields/tree/master) |
| :memo: | **License** | [![License](https://img.shields.io/:license-mit-blue.svg)](http://doge.mit-license.org) |
| :package: | **PyPi** | [![PyPi](https://badge.fury.io/py/django-localized-fields.svg)](https://pypi.python.org/pypi/django-localized-fields) |
| <img src="https://cdn.iconscout.com/icon/free/png-256/django-1-282754.png" width="22px" height="22px" align="center" /> | **Django Versions** | 2.0, 2.1, 2.2, 3.0, 3.1, 3.2 |
| <img src="http://www.iconarchive.com/download/i73027/cornmanthe3rd/plex/Other-python.ico" width="22px" height="22px" align="center" /> | **Python Versions** | 3.6, 3.7, 3.8, 3.9 |
| :book: | **Documentation** | [Read The Docs](https://django-localized-fields.readthedocs.io) |
| :warning: | **Upgrade** | [Upgrade fom v5.x](https://django-localized-fields.readthedocs.io/en/latest/releases.html#v6-0)
| :checkered_flag: | **Installation** | [Installation Guide](https://django-localized-fields.readthedocs.io/en/latest/installation.html) |

`django-localized-fields` is an implementation of a field class for Django models that allows the field's value to be set in multiple languages. It does this by utilizing the ``hstore`` type (PostgreSQL specific), which is available as `models.HStoreField` since Django 1.10.

---

:warning: **This README is for v6. See the `v5.x` branch for v5.x.**

---

## Working with the code
### Prerequisites

* PostgreSQL 10 or newer.
* Django 2.0 or newer.
* Python 3.6 or newer.

### Getting started

1. Clone the repository:

       λ git clone https://github.com/SectorLabs/django-localized-fields.git

2. Create a virtual environment:

       λ cd django-localized-fields
       λ virtualenv env
       λ source env/bin/activate

3. Create a postgres user for use in tests (skip if your default user is a postgres superuser):

       λ createuser --superuser localized_fields --pwprompt
       λ export DATABASE_URL=postgres://localized_fields:<password>@localhost/localized_fields

   Hint: if you're using virtualenvwrapper, you might find it beneficial to put
   the ``export`` line in ``$VIRTUAL_ENV/bin/postactivate`` so that it's always
   available when using this virtualenv.

4. Install the development/test dependencies:

       λ pip install ".[test]" ".[analysis]"

5. Run the tests:

       λ tox

7. Auto-format code, sort imports and auto-fix linting errors:

       λ python setup.py fix

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/SectorLabs/django-localized-fields",
    "name": "django-localized-fields",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "django,localized,language,models,fields,postgres,hstore,i18n",
    "author": "Sector Labs",
    "author_email": "open-source@sectorlabs.ro",
    "download_url": "",
    "platform": null,
    "description": "|  |  |  |\n|--------------------|---------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| :white_check_mark: | **Tests** | [![CircleCI](https://circleci.com/gh/SectorLabs/django-localized-fields/tree/master.svg?style=svg)](https://circleci.com/gh/SectorLabs/django-localized-fields/tree/master) |\n| :memo: | **License** | [![License](https://img.shields.io/:license-mit-blue.svg)](http://doge.mit-license.org) |\n| :package: | **PyPi** | [![PyPi](https://badge.fury.io/py/django-localized-fields.svg)](https://pypi.python.org/pypi/django-localized-fields) |\n| <img src=\"https://cdn.iconscout.com/icon/free/png-256/django-1-282754.png\" width=\"22px\" height=\"22px\" align=\"center\" /> | **Django Versions** | 2.0, 2.1, 2.2, 3.0, 3.1, 3.2 |\n| <img src=\"http://www.iconarchive.com/download/i73027/cornmanthe3rd/plex/Other-python.ico\" width=\"22px\" height=\"22px\" align=\"center\" /> | **Python Versions** | 3.6, 3.7, 3.8, 3.9 |\n| :book: | **Documentation** | [Read The Docs](https://django-localized-fields.readthedocs.io) |\n| :warning: | **Upgrade** | [Upgrade fom v5.x](https://django-localized-fields.readthedocs.io/en/latest/releases.html#v6-0)\n| :checkered_flag: | **Installation** | [Installation Guide](https://django-localized-fields.readthedocs.io/en/latest/installation.html) |\n\n`django-localized-fields` is an implementation of a field class for Django models that allows the field's value to be set in multiple languages. It does this by utilizing the ``hstore`` type (PostgreSQL specific), which is available as `models.HStoreField` since Django 1.10.\n\n---\n\n:warning: **This README is for v6. See the `v5.x` branch for v5.x.**\n\n---\n\n## Working with the code\n### Prerequisites\n\n* PostgreSQL 10 or newer.\n* Django 2.0 or newer.\n* Python 3.6 or newer.\n\n### Getting started\n\n1. Clone the repository:\n\n       \u03bb git clone https://github.com/SectorLabs/django-localized-fields.git\n\n2. Create a virtual environment:\n\n       \u03bb cd django-localized-fields\n       \u03bb virtualenv env\n       \u03bb source env/bin/activate\n\n3. Create a postgres user for use in tests (skip if your default user is a postgres superuser):\n\n       \u03bb createuser --superuser localized_fields --pwprompt\n       \u03bb export DATABASE_URL=postgres://localized_fields:<password>@localhost/localized_fields\n\n   Hint: if you're using virtualenvwrapper, you might find it beneficial to put\n   the ``export`` line in ``$VIRTUAL_ENV/bin/postactivate`` so that it's always\n   available when using this virtualenv.\n\n4. Install the development/test dependencies:\n\n       \u03bb pip install \".[test]\" \".[analysis]\"\n\n5. Run the tests:\n\n       \u03bb tox\n\n7. Auto-format code, sort imports and auto-fix linting errors:\n\n       \u03bb python setup.py fix\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Implementation of localized model fields using PostgreSQL HStore fields.",
    "version": "6.7",
    "project_urls": {
        "Homepage": "https://github.com/SectorLabs/django-localized-fields"
    },
    "split_keywords": [
        "django",
        "localized",
        "language",
        "models",
        "fields",
        "postgres",
        "hstore",
        "i18n"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "302cf748efcd289583e7a32e53a7b3d0c7b8bc8e10d2b4c3a7cdffc7a5003e00",
                "md5": "1384d5e94d339e014159c49f8efb92d2",
                "sha256": "21ffd76d15d2b9b557b13839290ea00be03bc16bcaa4ffdbff5a5d74b81d26de"
            },
            "downloads": -1,
            "filename": "django_localized_fields-6.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1384d5e94d339e014159c49f8efb92d2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 31583,
            "upload_time": "2023-08-10T12:44:49",
            "upload_time_iso_8601": "2023-08-10T12:44:49.443783Z",
            "url": "https://files.pythonhosted.org/packages/30/2c/f748efcd289583e7a32e53a7b3d0c7b8bc8e10d2b4c3a7cdffc7a5003e00/django_localized_fields-6.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-10 12:44:49",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "SectorLabs",
    "github_project": "django-localized-fields",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": false,
    "circle": true,
    "tox": true,
    "lcname": "django-localized-fields"
}
        
Elapsed time: 0.20171s