Skip to main content

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:

pip install django-permalinks

Configurations

  1. Add permalinks to your list of INSTALLED_APPS in settings.py:

    INSTALLED_APPS = [
        ...
        'permalinks',
        ...
    ]
    
  2. Add the permalinks URLs to urls.py of your base app on the top of the list:

    urlpatterns = [
      url('', include('permalinks.urls')),
      ...
    ]
    
  3. Add the permalinks middleware to settings.py on the top of the list:

    MIDDLEWARE = [
       'permalinks.middleware.main.PermalinksMiddleware',
       ...
    ]
    
  4. Run manage.py migrate to create the required table for the permalinks model.

  5. Create your permalinks objects in your Django admin interface.

  6. Test your OLD URLs and their responses by visiting them.

  7. Enjoy a smooth URL migration!

Metadata

Release files for django-permalinks 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-permalinks 0.1.4
File Size Uploaded
django-permalinks-0.1.4.tar.gz 4.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-permalinks 0.1.4
File Interpreter ABI Platform
django_permalinks-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 13.8 kB

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page