A Django App to make sure old URLs work with new URLs.
MIT License
This Django App acts as an internal redirector. Most likely use cases are when you have changed your URL scheme for a few pages, but your visitors still have the Old URL - this app can help you redirect the old scheme to the new one.
This Django app also provides a free URL shortner. In order to use it:
Install from PyPI:
pip install django-permalinks
Add permalinks
to your list of INSTALLED_APPS
in settings.py:
INSTALLED_APPS = [
...
'permalinks',
...
]
Add the permalinks URLs to urls.py
of your base app on the top of the list:
urlpatterns = [
url('', include('permalinks.urls')),
...
]
Add the permalinks middleware to settings.py
on the top of the list:
MIDDLEWARE = [
'permalinks.middleware.main.PermalinksMiddleware',
...
]
Run manage.py migrate
to create the required table for the permalinks model.
Create your permalinks
objects in your Django admin interface.
Test your OLD URLs and their responses by visiting them.
Enjoy a smooth URL migration!