Skip to main content

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

Installation

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

pip install django
pip install requests

When using Python 2.6, you will also need to install importlib.

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://github.com/bitmazk/django-tinylinks.git#egg=tinylinks

Add tinylinks to your INSTALLED_APPS:

INSTALLED_APPS = (
    ...,
    'tinylinks',
)

Add the tinylinks URLs to your urls.py:

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

Don’t forget to migrate your database:

./manage.py migrate tinylinks

Settings

Usage

Just visit the root URL of the app. Let’s assume you hooked the app into your urls.py at s/, then visit yoursite.com/s/. You will see your tinylist overview. Go to yoursite.com/s/create/ 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 yoursite.com/s/yourshorturl and you will be redirected to your long URL.

Contribute

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
make develop

git co -b feature_branch master
# Implement your feature and tests
git add . && git commit
git push -u origin feature_branch
# Send us a pull request for your feature branch

In order to run the tests, simply execute tox. This will install two new environments (for Django 1.8 and Django 1.9) and run the tests against both environments.

Release files for django-tinylinks 0.7.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-tinylinks 0.7.1
File Size Uploaded
django-tinylinks-0.7.1.tar.gz 17.8 kB Details

Release history Release notifications | RSS feed

This release

0.7.1 This release

1 release file

0.7

1 release file

0.6

1 release file

0.5.3

1 release file

0.5.2

1 release file

0.5.1

1 release file

0.5

1 release file

0.4

1 release file

0.3

1 release file

0.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page