Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aekanshd/django-permalinks
A Django App to make sure old URLs work with new URLs.
https://github.com/aekanshd/django-permalinks
django django-admin django-framework django-permalinks permalinks python3
Last synced: about 1 month ago
JSON representation
A Django App to make sure old URLs work with new URLs.
- Host: GitHub
- URL: https://github.com/aekanshd/django-permalinks
- Owner: aekanshd
- License: mit
- Created: 2019-08-16T15:29:29.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-28T17:58:50.000Z (over 4 years ago)
- Last Synced: 2024-09-27T16:40:59.627Z (about 2 months ago)
- Topics: django, django-admin, django-framework, django-permalinks, permalinks, python3
- Language: Python
- Size: 22.5 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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:
1. Use the Django Admin to make a new object of Permalinks.
2. While creating an object, you should see a link which says "Generate a random string". Click it.
3. Click the "Use this string" link when it appears.
4. Enter the long URL in the 'NEW URL' box above.# Installation
Install from PyPI:
```terminal
pip install django-permalinks
```# Configurations
1. Add `permalinks` to your list of `INSTALLED_APPS` in settings.py:
```python
INSTALLED_APPS = [
...
'permalinks',
...
]
```
3. Add the permalinks URLs to `urls.py` of your base app **on the top of the list**:
```python
urlpatterns = [
url('', include('permalinks.urls')),
...
]
```4. Add the permalinks middleware to `settings.py` **on the top of the list**:
```python
MIDDLEWARE = [
'permalinks.middleware.main.PermalinksMiddleware',
...
]
```5. Run `manage.py migrate` to create the required table for the permalinks model.
6. Create your `permalinks` objects in your Django admin interface.
7. Test your OLD URLs and their responses by visiting them.
8. Enjoy a smooth URL migration!