Skip to content

moner-pagamentos/django-shortener

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%