Skip to content

Latest commit

 

History

39 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django Shortener

CircleCI Coverage Status PyPi Package

Basic URL shortener as a Django app.

Requirements

  • Python 3.6+
  • Django 2.2+

Installation

Install with pip pip install shortener

Add shortener to INSTALLED_APPS

INSTALLED_APPS = (
    ...
    'shortener.apps.ShortenerConfig',
    ...
)

Add the following to urls.py

urlpatterns = [
    ...
    path('s/', include('shortener.urls', namespace='shortener')),
    ...
]

This will shorten URLs to example.com/s/<slug>

Run migrations ./manage.py migrate

Documentation

Shortened URLs can be created using the django admin site or by calling shortener.models.Url.get_or_create() with the URL you want to shorten.

Changelog

See CHANGELOG.md

License

See LICENSE

About

URL Shortener in Django

Resources

Stars

4 stars

Watchers

13 watching

Forks

Releases

Packages

Used by

Contributors

Languages