Skip to main content

Django URL Shortener is a Django app to to include URL Shortening feature in your Django Project.

Project description

===== Django URL Shortener

Django URL Shortener is a Django app to to include URL Shortening feature in your Django Project

Detailed documentation is in the "docs" directory.

Quick start

  1. Add "django_url_shortener" to your INSTALLED_APPS setting like this::

    INSTALLED_APPS = [ ... 'django_url_shortener', ]

  2. Include the polls URLconf in your project urls.py like this::

    path('s/', include('django_url_shortener.urls')),

  3. Run python manage.py migrate to create the polls models.

  4. [Optional] Upate configs in settings.py SHORTCODE_MIN = 4 SHORTCODE_MAX = 20 BASE_URL = "https://mysite.com"

  5. Import shorten_url method from django_url_shortener.utils import shorten_url

  6. Shorten your URL

    created, short_url = shorten_url("https://github.com/rishav00a/django_url_shortener") created, short_url = shorten_url("https://github.com/rishav00a/django_url_shortener/issues","xyzw")

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distribution

django-url-shortener-app-0.1.tar.gz (4.7 kB view details)

Uploaded Source

File details

Details for the file django-url-shortener-app-0.1.tar.gz.

File metadata

  • Download URL: django-url-shortener-app-0.1.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for django-url-shortener-app-0.1.tar.gz
Algorithm Hash digest
SHA256 0b0bd54cc0a97f06682f139588d07f8dea8d9cdb1264c3bf85de999c2ca561a6
MD5 8e324542d77c49238e36c607bee5c25a
BLAKE2b-256 0717c34edf23f84ddf393d5397a330eba3f6e1b5f17dfae5bbbd720957097767

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page