django-languageselect


Namedjango-languageselect JSON
Version 5.0.1 PyPI version JSON
download
home_pagehttps://github.com/RegioHelden/django-languageselect
SummarySimple language select as custom template tag
upload_time2024-06-27 13:31:52
maintainerNone
docs_urlNone
authorRegioHelden GmbH
requires_pythonNone
licenseMIT license
keywords django_languageselect
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # django_languageselect

[![PyPI](https://img.shields.io/pypi/v/django_languageselect.svg)](https://pypi.python.org/pypi/django_languageselect)
[![PyPI](https://github.com/RegioHelden/django-languageselect/actions/workflows/build.yml/badge.svg)](https://github.com/RegioHelden/django-languageselect/actions)

Simple language select as custom template tag

## Requirements

- `"django.middleware.locale.LocaleMiddleware"` in `MIDDLEWARE_CLASSES` / `MIDDLEWARE`
- `"django.core.context_processors.request"` in `TEMPLATE_CONTEXT_PROCESSORS` / `TEMPLATES['OPTIONS']['context_processors']`
- Add `"django_languageselect"` to `INSTALLED_APPS`

## Usage

To use django_languageselect in a project, add it to `INSTALLED_APP`

```python
INSTALLED_APP  = [
    *INSTALLED_APP,
    'django_languageselect',
]
```

Add this to your urls.py

```python
urlpatterns = [
    *urlpatterns,
    url(r'^languageselect/', include('django_languageselect.urls')),
]
```

Use the languageselect tag where you which to show languages list:

```jinja
{% load languageselect %}

{% languageselect %}
```

## Routes

The only url provided by this application is "languageselect_index". Required GET-parameter is "language", optional GET-parameter is "next". Next contains the named url to redirect after the language change. This parameter is pre-filled with the current page url.
Customization

Feel free to use your own template, just add languageselect/layer.html

* Free software: MIT license

## Tests

Tests will be automatically run by travis on commit to master.

They can also be executed locally using docker-compose by running `docker-compose up`

## Making a new release

[bumpversion](https://github.com/peritus/bumpversion) is used to manage releases.

Add your changes to the HISTORY_ and run `docker-compose run --rm python bumpversion <major|minor|patch>`, then push (including tags)


# History

## 5.0.1 (2024-06-27)

* Remove support for Python below 3.10
* Remove support for Django below 4.2
* Add support for Django 5.0
* Add support for Python 3.11
* Add support for Python 3.12
* Modernize build and test environment

## 5.0.0 (2024-06-27)

Not released to due an issue with the deploy action

## 4.0.1 (2023-01-02)

* Remove support for Django < 3.2
* Remove support for Python < 3.8
* Modernize build and test environment

## 4.0.0 (2023-01-02)

Not released to due an issue with the deploy action

## 3.0.0 (2021-05-05)

* Remove support for Django 2.x
* Remove utf 8 headers as all Python 3 files must be unicode anyways
* Fix CI badge in readme
* Modernize build and test environment

# 2.0.2 (2021-05-05)

* Remove setting language in session as this was depreacted since Django 2.x and is broken with Django 3.x
* Add tests for Django 3.2
* Remove old python 2 and Django compatibility code

# 2.0.1 (2021-03-25)

* Fix documentation syntax

# 2.0.0 (2021-03-25)

* Update packages
* Update Docker env
* Remove support for Django < 2.2

# 1.0.0 (2019-11-04)

* Update packages
* Remove Python 2 support
* Add docker container to run tests locally

# 0.1.6 (2018-01-27)

* Add missing folders and modules from package

# 0.1.5 (2018-01-15)

* Add support for python 3 and Django 2, impleneting tests in travis ci


# 0.1.4 (2017-04-18)

* Rename package to django_languageselect (backwards incompatible) to be able to import the module

# 0.1.3 (2016-06-17)

*  Fix session key to store language, Django 1.9 compatibility

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/RegioHelden/django-languageselect",
    "name": "django-languageselect",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "django_languageselect",
    "author": "RegioHelden GmbH",
    "author_email": "entwicklung@regiohelden.de",
    "download_url": "https://files.pythonhosted.org/packages/98/36/c79e959df498a830b20b524d2fa43dd4bd45a17945a588ed609184bd45ea/django_languageselect-5.0.1.tar.gz",
    "platform": null,
    "description": "# django_languageselect\n\n[![PyPI](https://img.shields.io/pypi/v/django_languageselect.svg)](https://pypi.python.org/pypi/django_languageselect)\n[![PyPI](https://github.com/RegioHelden/django-languageselect/actions/workflows/build.yml/badge.svg)](https://github.com/RegioHelden/django-languageselect/actions)\n\nSimple language select as custom template tag\n\n## Requirements\n\n- `\"django.middleware.locale.LocaleMiddleware\"` in `MIDDLEWARE_CLASSES` / `MIDDLEWARE`\n- `\"django.core.context_processors.request\"` in `TEMPLATE_CONTEXT_PROCESSORS` / `TEMPLATES['OPTIONS']['context_processors']`\n- Add `\"django_languageselect\"` to `INSTALLED_APPS`\n\n## Usage\n\nTo use django_languageselect in a project, add it to `INSTALLED_APP`\n\n```python\nINSTALLED_APP  = [\n    *INSTALLED_APP,\n    'django_languageselect',\n]\n```\n\nAdd this to your urls.py\n\n```python\nurlpatterns = [\n    *urlpatterns,\n    url(r'^languageselect/', include('django_languageselect.urls')),\n]\n```\n\nUse the languageselect tag where you which to show languages list:\n\n```jinja\n{% load languageselect %}\n\n{% languageselect %}\n```\n\n## Routes\n\nThe only url provided by this application is \"languageselect_index\". Required GET-parameter is \"language\", optional GET-parameter is \"next\". Next contains the named url to redirect after the language change. This parameter is pre-filled with the current page url.\nCustomization\n\nFeel free to use your own template, just add languageselect/layer.html\n\n* Free software: MIT license\n\n## Tests\n\nTests will be automatically run by travis on commit to master.\n\nThey can also be executed locally using docker-compose by running `docker-compose up`\n\n## Making a new release\n\n[bumpversion](https://github.com/peritus/bumpversion) is used to manage releases.\n\nAdd your changes to the HISTORY_ and run `docker-compose run --rm python bumpversion <major|minor|patch>`, then push (including tags)\n\n\n# History\n\n## 5.0.1 (2024-06-27)\n\n* Remove support for Python below 3.10\n* Remove support for Django below 4.2\n* Add support for Django 5.0\n* Add support for Python 3.11\n* Add support for Python 3.12\n* Modernize build and test environment\n\n## 5.0.0 (2024-06-27)\n\nNot released to due an issue with the deploy action\n\n## 4.0.1 (2023-01-02)\n\n* Remove support for Django < 3.2\n* Remove support for Python < 3.8\n* Modernize build and test environment\n\n## 4.0.0 (2023-01-02)\n\nNot released to due an issue with the deploy action\n\n## 3.0.0 (2021-05-05)\n\n* Remove support for Django 2.x\n* Remove utf 8 headers as all Python 3 files must be unicode anyways\n* Fix CI badge in readme\n* Modernize build and test environment\n\n# 2.0.2 (2021-05-05)\n\n* Remove setting language in session as this was depreacted since Django 2.x and is broken with Django 3.x\n* Add tests for Django 3.2\n* Remove old python 2 and Django compatibility code\n\n# 2.0.1 (2021-03-25)\n\n* Fix documentation syntax\n\n# 2.0.0 (2021-03-25)\n\n* Update packages\n* Update Docker env\n* Remove support for Django < 2.2\n\n# 1.0.0 (2019-11-04)\n\n* Update packages\n* Remove Python 2 support\n* Add docker container to run tests locally\n\n# 0.1.6 (2018-01-27)\n\n* Add missing folders and modules from package\n\n# 0.1.5 (2018-01-15)\n\n* Add support for python 3 and Django 2, impleneting tests in travis ci\n\n\n# 0.1.4 (2017-04-18)\n\n* Rename package to django_languageselect (backwards incompatible) to be able to import the module\n\n# 0.1.3 (2016-06-17)\n\n*  Fix session key to store language, Django 1.9 compatibility\n",
    "bugtrack_url": null,
    "license": "MIT license",
    "summary": "Simple language select as custom template tag",
    "version": "5.0.1",
    "project_urls": {
        "Homepage": "https://github.com/RegioHelden/django-languageselect"
    },
    "split_keywords": [
        "django_languageselect"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "17308e22fc427087881176a88419ddc9b3f29219d76d9c3212ffab6be0381228",
                "md5": "cde7baea1b4aa5dd23be027ab060444e",
                "sha256": "93a72be2f61479adb7e71608b85d5e18f568a267abc15ccee65c72d0a7de1d28"
            },
            "downloads": -1,
            "filename": "django_languageselect-5.0.1-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "cde7baea1b4aa5dd23be027ab060444e",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 6824,
            "upload_time": "2024-06-27T13:31:50",
            "upload_time_iso_8601": "2024-06-27T13:31:50.453227Z",
            "url": "https://files.pythonhosted.org/packages/17/30/8e22fc427087881176a88419ddc9b3f29219d76d9c3212ffab6be0381228/django_languageselect-5.0.1-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9836c79e959df498a830b20b524d2fa43dd4bd45a17945a588ed609184bd45ea",
                "md5": "40d39f73598ed07bf9105fced9e95a24",
                "sha256": "42873adf9466e246133a01618a7ba6ae3ed24e8f82d983ce1f9ad261a0b8b89b"
            },
            "downloads": -1,
            "filename": "django_languageselect-5.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "40d39f73598ed07bf9105fced9e95a24",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 7452,
            "upload_time": "2024-06-27T13:31:52",
            "upload_time_iso_8601": "2024-06-27T13:31:52.122154Z",
            "url": "https://files.pythonhosted.org/packages/98/36/c79e959df498a830b20b524d2fa43dd4bd45a17945a588ed609184bd45ea/django_languageselect-5.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-27 13:31:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "RegioHelden",
    "github_project": "django-languageselect",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "django-languageselect"
}
        
Elapsed time: 0.27367s