Skip to main content

URL shortener in django

Project description


CircleCI Coverage Status PyPi Package

Basic URL shortener as a Django app.

To use:

  1. Install using pip pip install shortener
  2. Include shortener.apps.ShortenerConfig to INSTALLED_APPS in your project's
  3. Add the shortener to
    • Example: path('s/', include('shortener.urls', namespace='shortener')) will shorten URLs to<ID>.
  4. python migrate
  5. Either add in URL shortcuts manually through Admin, or add some hook in your project to call shortener.objects.get_or_create. The function takes in a long URL and returns a Url object which contains the full shortened url as Url.shortened, and the slug in Url.short_id.

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 shortener, version 0.2.1
Filename, size File type Python version Upload date Hashes
Filename, size shortener-0.2.1-py3-none-any.whl (5.6 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size shortener-0.2.1.tar.gz (3.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page