==================================
django-ok-redirects |PyPI version|
==================================
|Upload Python Package| |Code Health| |Python Versions| |PyPI downloads| |license| |Project Status|
Simple Redirects App, which is particularly useful in the cases where you want to update some existing URLs without compromising your Website SEO.
Installation
============
Install with pip:
.. code:: shell
$ pip install django-ok-redirects
Update INSTALLED_APPS:
.. code:: python
INSTALLED_APPS = [
...
'ok_redirects',
...
]
Make migrations
.. code:: shell
$ python manage.py migrate
Available settings
==================
``REDIRECTS_IGNORE_PATH_PREFIXES`` - Tuple of path prefixes to ignore.
For example:
.. code:: python
REDIRECTS_IGNORE_PATH_PREFIXES = (
'/api/v1/',
'/uploads/',
'/static/',
)
Basic example to use:
=====================
Add the redirects middleware to the MIDDLEWARE configuration:
-------------------------------------------------------------
.. code:: python
MIDDLEWARE = [
...
'ok_redirects.middleware.RedirectMiddleware'
]
.. |PyPI version| image:: https://badge.fury.io/py/django-ok-redirects.svg
:target: https://badge.fury.io/py/django-ok-redirects
.. |Upload Python Package| image:: https://github.com/LowerDeez/ok-redirects/workflows/Upload%20Python%20Package/badge.svg
:target: https://github.com/LowerDeez/ok-redirects/
:alt: Build status
.. |Code Health| image:: https://api.codacy.com/project/badge/Grade/e5078569e40d428283d17efa0ebf9d19
:target: https://www.codacy.com/app/LowerDeez/ok-redirects
:alt: Code health
.. |Python Versions| image:: https://img.shields.io/pypi/pyversions/django-ok-redirects.svg
:target: https://pypi.org/project/django-ok-redirects/
:alt: Python versions
.. |license| image:: https://img.shields.io/pypi/l/django-ok-redirects.svg
:alt: Software license
:target: https://github.com/LowerDeez/ok-redirects/blob/master/LICENSE
.. |PyPI downloads| image:: https://img.shields.io/pypi/dm/django-ok-redirects.svg
:alt: PyPI downloads
.. |Project Status| image:: https://img.shields.io/pypi/status/django-ok-redirects.svg
:target: https://pypi.org/project/django-ok-redirects/
:alt: Project Status
Raw data
{
"_id": null,
"home_page": "https://github.com/LowerDeez/ok-redirects",
"name": "django-ok-redirects",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "python,redirects,redirects-models,django",
"author": "Oleg Kleschunov",
"author_email": "igorkleschunov@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/39/34/5ee5f4c4851670f4938242d09b354dabff85b615aa9a30db5b875992bc7b/django-ok-redirects-0.4.0.tar.gz",
"platform": null,
"description": "==================================\ndjango-ok-redirects |PyPI version|\n==================================\n\n|Upload Python Package| |Code Health| |Python Versions| |PyPI downloads| |license| |Project Status|\n\nSimple Redirects App, which is particularly useful in the cases where you want to update some existing URLs without compromising your Website SEO.\n\nInstallation\n============\n\nInstall with pip:\n\n.. code:: shell\n\n $ pip install django-ok-redirects\n\nUpdate INSTALLED_APPS:\n\n.. code:: python\n\n INSTALLED_APPS = [\n ...\n 'ok_redirects',\n ...\n ]\n\nMake migrations\n\n.. code:: shell\n\n $ python manage.py migrate\n\n\nAvailable settings\n==================\n\n``REDIRECTS_IGNORE_PATH_PREFIXES`` - Tuple of path prefixes to ignore.\n\n\nFor example:\n\n.. code:: python\n\n REDIRECTS_IGNORE_PATH_PREFIXES = (\n '/api/v1/',\n '/uploads/',\n '/static/',\n )\n\n\nBasic example to use:\n=====================\n\nAdd the redirects middleware to the MIDDLEWARE configuration:\n-------------------------------------------------------------\n\n.. code:: python\n\n MIDDLEWARE = [\n ...\n\n 'ok_redirects.middleware.RedirectMiddleware'\n ]\n\n\n.. |PyPI version| image:: https://badge.fury.io/py/django-ok-redirects.svg\n :target: https://badge.fury.io/py/django-ok-redirects\n.. |Upload Python Package| image:: https://github.com/LowerDeez/ok-redirects/workflows/Upload%20Python%20Package/badge.svg\n :target: https://github.com/LowerDeez/ok-redirects/\n :alt: Build status\n.. |Code Health| image:: https://api.codacy.com/project/badge/Grade/e5078569e40d428283d17efa0ebf9d19\n :target: https://www.codacy.com/app/LowerDeez/ok-redirects\n :alt: Code health\n.. |Python Versions| image:: https://img.shields.io/pypi/pyversions/django-ok-redirects.svg\n :target: https://pypi.org/project/django-ok-redirects/\n :alt: Python versions\n.. |license| image:: https://img.shields.io/pypi/l/django-ok-redirects.svg\n :alt: Software license\n :target: https://github.com/LowerDeez/ok-redirects/blob/master/LICENSE\n.. |PyPI downloads| image:: https://img.shields.io/pypi/dm/django-ok-redirects.svg\n :alt: PyPI downloads\n.. |Project Status| image:: https://img.shields.io/pypi/status/django-ok-redirects.svg\n :target: https://pypi.org/project/django-ok-redirects/ \n :alt: Project Status\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Simple Redirects App, which is particularly useful in the cases where you want to update some existing URLs without compromising your Website SEO.",
"version": "0.4.0",
"project_urls": {
"Homepage": "https://github.com/LowerDeez/ok-redirects"
},
"split_keywords": [
"python",
"redirects",
"redirects-models",
"django"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "aae1954798c4e2dfe75663e224b70bca847f908760b7502e49381082db83ff49",
"md5": "4dfacbc8d861e674241fdc896c1af5c1",
"sha256": "640f078541cdaeedf02379f9b501d5db90f8f540e497551cf712fca1324c6663"
},
"downloads": -1,
"filename": "django_ok_redirects-0.4.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4dfacbc8d861e674241fdc896c1af5c1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 14700,
"upload_time": "2024-02-01T21:32:31",
"upload_time_iso_8601": "2024-02-01T21:32:31.613862Z",
"url": "https://files.pythonhosted.org/packages/aa/e1/954798c4e2dfe75663e224b70bca847f908760b7502e49381082db83ff49/django_ok_redirects-0.4.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "39345ee5f4c4851670f4938242d09b354dabff85b615aa9a30db5b875992bc7b",
"md5": "7091cd7942f42b886733e56e54df06fe",
"sha256": "d8334b64b7a06de52935f41332c7f92052e182acb9e2cd9640fa77204c503924"
},
"downloads": -1,
"filename": "django-ok-redirects-0.4.0.tar.gz",
"has_sig": false,
"md5_digest": "7091cd7942f42b886733e56e54df06fe",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 9577,
"upload_time": "2024-02-01T21:32:40",
"upload_time_iso_8601": "2024-02-01T21:32:40.369183Z",
"url": "https://files.pythonhosted.org/packages/39/34/5ee5f4c4851670f4938242d09b354dabff85b615aa9a30db5b875992bc7b/django-ok-redirects-0.4.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-01 21:32:40",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "LowerDeez",
"github_project": "ok-redirects",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "django-ok-redirects"
}