Skip to main content

A simple Django App to hold short links mapped to long urls used in your projects.

Project description


A simple Django App to hold short links mapped to long urls used in your projects.


To use this package following needed. if not provided will be installed automatically.



Note: This package is well tested on django>=2.0. But if you are using older versions can be used with minor changes in structure.

install using pip:

$ pip install django-shortlink


Register app in


update like below:

urlpatterns += [
    re_path(r'', include('shortlink.urls')),

Now set Setting variables, If not will use default values as below:

HOST_ADDRESS = 'http://localhost:8000'

Now to create shortlink, pass your full_url like this:

from shortlink.models import ShortLink
s = ShortLink.objects.create(full_url="")

short_url is the shorten url that you should give users. If they click on it, methods in will be triggered and if short_url is valid, will redirect to full_url.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-shortlink, version 0.0.8
Filename, size File type Python version Upload date Hashes
Filename, size django_shortlink-0.0.8-py3-none-any.whl (22.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size django-shortlink-0.0.8.tar.gz (18.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page