Skip to content
This repository has been archived by the owner on Mar 31, 2020. It is now read-only.

olivierlefloch/django-short-urls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

7d6c7f3 · Feb 3, 2019
Aug 8, 2018
Oct 16, 2018
Dec 21, 2018
Dec 21, 2018
Oct 17, 2018
Dec 21, 2018
Dec 21, 2018
Jan 25, 2013
Oct 19, 2013
Aug 20, 2018
Mar 8, 2013
Oct 20, 2013
Dec 5, 2018

Repository files navigation

django-short-urls

CircleCI

For dependencies see requirements.txt.

Installation

Add a local_settings.py file in directory django_short_urls with

cp local_settings.tpl.py local_settings.py
vi local_settings.py

Setup your web server to load the wsgi.py file.

Add a new user to your database using the Django shell:

% ./manage.py shell                                                                                         ~/Dropbox/Work4Labs/django-short-urls
>>> from django_short_urls.models import User
>>> User(login='work4labs', api_key='mysecretkey', email="root@work4labs.com").save()
<User: User object>

You can then register new urls via requests to the API such as (take care to url encode urls):

% curl -d "prefix=work4labs&short_path=corporate&long_url=http://www.work4labs.com/" "http://work4labs:mysecretkey@workfor.us/api/v1/new"
work4labs/corporate -> http://www.work4labs.com/

Once that is done http://workfor.us/work4labs/corporate will redirect to http://www.work4labs.com/.

Work4 Labs internal documentation at https://work4labs.atlassian.net/wiki/pages/viewpage.action?pageId=24248366

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published