Skip to main content

A reusable Django app that adds a link shortener like to your site.

Project description

A Django application that adds an URL shortener to your site similar to

This is an early alpha. Use it with caution.


You need to install the following prerequisites in order to use this app:

pip install django==1.4.2
pip install South==0.7.6
pip install django-libs==0.8
pip install urllib3==1.5

If you want to install the latest stable release from PyPi:

$ pip install django-tinylinks

If you feel adventurous and want to install the latest commit from GitHub:

$ pip install -e git://

Add tinylinks to your INSTALLED_APPS:


Add the tinylinks URLs to your

urlpatterns = patterns('',
    url(r'^s/', include('tinylinks.urls')),

Don’t forget to migrate your database:

./ migrate tinylinks



Just visit the root URL of the app. Let’s assume you hooked the app into your at s/, then visit You will see your tinylist overview. Go to to see a form to submit a new long URL.

After submitting, you will be redirected to a new page which shows the generated short URL. If you want this URL to have a different short URL, just change the short URL to your liking.

Now visit and you will be redirected to your long URL.


If you want to contribute to this project, please perform the following steps:

# Fork this repository
# Clone your fork
$ mkvirtualenv -p python2.7 django-tinylinks
$ pip install -r requirements.txt
$ ./tinylinks/tests/
# You should get no failing tests

$ git co -b feature_branch master
# Implement your feature and tests
$ ./tinylinks/tests/
# You should still get no failing tests
# Describe your change in the CHANGELOG.txt
$ git add . && git commit
$ git push origin feature_branch
# Send us a pull request for your feature branch

Whenever you run the tests a coverage output will be generated in tests/coverage/index.html. When adding new features, please make sure that you keep the coverage at 100%.

If you are making changes that need to be tested in a browser (i.e. to the CSS or JS files), you might want to setup a Django project, follow the installation insttructions above, then run python develop. This will just place an egg-link to your cloned fork in your project’s virtualenv.


Check the issue tracker on github for milestones and features to come.

Project details

Release history Release notifications

History Node


History Node


History Node


This version
History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
django-tinylinks-0.5.3.tar.gz (18.8 kB) Copy SHA256 hash SHA256 Source None Apr 14, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page