Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/martingms/django-globalshorturls
A small Django application for generating short URLs from any other URL.
https://github.com/martingms/django-globalshorturls
Last synced: 26 days ago
JSON representation
A small Django application for generating short URLs from any other URL.
- Host: GitHub
- URL: https://github.com/martingms/django-globalshorturls
- Owner: martingms
- License: mit
- Created: 2010-12-02T22:34:50.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2010-12-21T01:56:43.000Z (almost 14 years ago)
- Last Synced: 2023-03-11T13:03:45.406Z (over 1 year ago)
- Language: Python
- Homepage: https://github.com/martingamm/django-globalshorturls
- Size: 102 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README
- License: LICENSE
Awesome Lists containing this project
README
== django-globalshorturls ==
An app for the django framework that simplifies the task of shortening any URL to an URL of the form yourdomain.com/XYZ.
It supports very basic stats (how many has visited the link), as well as a simple interface for adding new URLs.If you only need to support shortening of local urls (to articles on your own site for example), I recommend using django-shorturls instead, that can be found here: https://github.com/jacobian/django-shorturls. The baseconv.py file in globalshorturls is borrowed from that app.
If you have any questions, feel free to contact me on my twitter http://twitter.com/martingamm.
Patches are very welcome!
== Usage ==
1. Add SHORT_URL_PREFIX = 'http://yoururl.com/' to your settings file, substituting yoururl.com
with the domain name you use for shortening.2. Add globalshorturls to your INSTALLED_APPS
3. Move the globalshorturls and templates folder into your project folder.
4. Set up urls.py the way you want it. It is probably a good idea to have the
url(r'^(?P[a-zA-Z0-9]+)/$', 'globalshorturls.views.redirect', name='globalshorturls.redirect')
line be the last one to be parsed (be on the bottom of your global urls.py) so that a visitor tries
to match every other url-regex before resorting to the redirect function.5. Sync your database
6. Point your browser towards whatever url you gave the index function, and start shortening your urls!