A Django App to make sure old URLs work with new URLs.
Project description
Django Permalinks
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.
Free URL Shortner
This Django app also provides a free URL shortner. In order to use it:
- Use the Django Admin to make a new object of Permalinks.
- While creating an object, you should see a link which says "Generate a random string". Click it.
- Click the "Use this string" link when it appears.
- Enter the long URL in the 'NEW URL' box above.
Installation
Install from PyPI:
pip install django-permalinks
Configurations
-
Add
permalinks
to your list ofINSTALLED_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!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django-permalinks-0.1.4.tar.gz
.
File metadata
- Download URL: django-permalinks-0.1.4.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95cbf78d9e99f0d8f7aca2935a1cfc32a31fc7cd1278d292055a7ff3676b5267 |
|
MD5 | d1e7553a9d8b7d5693c128e5e555ca54 |
|
BLAKE2b-256 | 40308ebf73955768a02729e6e139cdda2c9592fad72f233726c0f52f6eff12b0 |
File details
Details for the file django_permalinks-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: django_permalinks-0.1.4-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 968a76ed416538617c46ad427b97fee76daa79b1f0e37ee0623db452f8b97609 |
|
MD5 | ef7954b5e226160aa51edc0a9321e10b |
|
BLAKE2b-256 | 7a67a4346f93070ef687f723f45cebcec0f7e8c10f22cb07b7829f5c71dcbdcb |