Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/olivierlefloch/django-short-urls
https://github.com/olivierlefloch/django-short-urls
Last synced: 13 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/olivierlefloch/django-short-urls
- Owner: olivierlefloch
- License: other
- Archived: true
- Created: 2012-07-07T20:12:29.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2020-03-27T13:14:51.000Z (over 4 years ago)
- Last Synced: 2024-08-01T22:57:12.523Z (3 months ago)
- Language: Python
- Size: 434 KB
- Stars: 4
- Watchers: 4
- Forks: 2
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# django-short-urls
[![CircleCI](https://circleci.com/gh/Work4Labs/django-short-urls.svg?style=svg&circle-token=eeabf3e67644ee77dada25aef2fc30221d439b0b)](https://circleci.com/gh/Work4Labs/django-short-urls)
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.pySetup 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="[email protected]").save()
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:[email protected]/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