From e384110cf60b8cfc2b1ecb82018924059495ca7c Mon Sep 17 00:00:00 2001 From: Jens Nistler Date: Thu, 27 Jun 2024 15:20:59 +0200 Subject: [PATCH] change docs to markdown --- HISTORY.rst => HISTORY.md | 41 +++++++++++++-------------------------- README.rst => README.md | 41 ++++++++++++--------------------------- setup.py | 4 ++-- 3 files changed, 27 insertions(+), 59 deletions(-) rename HISTORY.rst => HISTORY.md (71%) rename README.rst => README.md (55%) diff --git a/HISTORY.rst b/HISTORY.md similarity index 71% rename from HISTORY.rst rename to HISTORY.md index c0ffd91..c726691 100644 --- a/HISTORY.rst +++ b/HISTORY.md @@ -1,9 +1,6 @@ -======= -History -======= +# History -5.0.0 (2024-06-27) -================== +## 5.0.0 (2024-06-27) * Remove support for Python below 3.10 * Remove support for Django below 4.2 * Add support for Django 5.0 @@ -11,70 +8,58 @@ History * Add support for Python 3.12 * Modernize build and test environment -4.0.1 (2023-01-02) -================== +## 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) -================== +## 4.0.0 (2023-01-02) Not released to due an issue with the deploy action -3.0.0 (2021-05-05) -================== +## 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) -================== +# 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) -================== +# 2.0.1 (2021-03-25) * Fix documentation syntax -2.0.0 (2021-03-25) -================== +# 2.0.0 (2021-03-25) * Update packages * Update Docker env * Remove support for Django < 2.2 -1.0.0 (2019-11-04) -================== +# 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) -================== +# 0.1.6 (2018-01-27) * Add missing folders and modules from package -0.1.5 (2018-01-15) -================== +# 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) -================== +# 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) -================== +# 0.1.3 (2016-06-17) * Fix session key to store language, Django 1.9 compatibility diff --git a/README.rst b/README.md similarity index 55% rename from README.rst rename to README.md index 8a17f5c..59eae07 100644 --- a/README.rst +++ b/README.md @@ -1,26 +1,17 @@ -===================== -django_languageselect -===================== - - -.. image:: https://img.shields.io/pypi/v/django_languageselect.svg - :target: https://pypi.python.org/pypi/django_languageselect - -.. image:: https://github.com/RegioHelden/django-languageselect/actions/workflows/build.yml/badge.svg - :target: https://github.com/RegioHelden/django-languageselect/actions +# 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 -============ +## 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 +- `"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: -====== +## Usage To use django_languageselect in a project, add it to `INSTALLED_APP` @@ -48,8 +39,7 @@ Use the languageselect tag where you which to show languages list: {% languageselect %} ``` -Routes: -======= +## 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 @@ -57,22 +47,15 @@ Customization Feel free to use your own template, just add languageselect/layer.html * Free software: MIT license -* Documentation: https://django-languageselect.readthedocs.io. -Tests -===== +## 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 -==================== +## Making a new release -bumpversion_ is used to manage releases. - -.. _bumpversion: https://github.com/peritus/bumpversion +[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 `, then push (including tags) - -.. _HISTORY: ./HISTORY.rst diff --git a/setup.py b/setup.py index e33ec66..f58a8a5 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ def get_version(*file_paths): raise RuntimeError('Unable to find version string.') -with open('README.rst') as readme_file: +with open('README.md') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: @@ -37,7 +37,7 @@ def get_version(*file_paths): version=get_version('django_languageselect', '__init__.py'), description='Simple language select as custom template tag', long_description=readme + '\n\n' + history, - long_description_content_type='text/x-rst', + long_description_content_type='text/markdown', author='RegioHelden GmbH', author_email='entwicklung@regiohelden.de', url='https://github.com/RegioHelden/django-languageselect',