{ "info": { "author": "Simon Willison, Jacob Kaplan-Moss", "author_email": "jacob@jacobian.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP" ], "description": "django-shorturls\n================\n\n.. image:: https://travis-ci.org/bfirsh/django-shorturls.svg?branch=master\n :target: https://travis-ci.org/bfirsh/django-shorturls\n.. image:: https://badge.fury.io/py/django-shorturls.svg\n :target: http://badge.fury.io/py/django-shorturls\n\nA custom URL shortening app for Django, including easy ``rev=canonical``\nsupport.\n\nMost code was originally by Simon Willison; see\nhttp://blog.simonwillison.net/post/57956849396/revcanonical/ for details. Improved\nslightly and packaged by Jacob Kaplan-Moss.\n\nPatches welcome: http://github.com/bfirsh/django-shorturls\n\nUsage\n=====\n\nSo, you want to host your own short URLs on your Django site:\n\n1. In your settings, define a set of prefixes for short URLs::\n\n SHORTEN_MODELS = {\n 'A': 'myapp.animal',\n 'V': 'myapp.vegetable',\n 'M': 'myapp.mineral'\n }\n\n The keys are string prefixes; they can be any string, actually,\n but since we're going for short a single character is probably good.\n \n Values are the (hopefully-familiar) ``\".\"`` used\n by Django to identify a model. Remember: ``app-name`` is the\n (case-sensitive) last bit of your app's name in ``INSTALLED_APPS``, and\n ```` is your model class's name, lowercased.\n \n Make sure your models have a ``get_absolute_url()`` method defined.\n \n2. Wire up the redirect view by adding to your URLconf::\n\n ('^short/', include('shorturls.urls'))\n \n3. If you'd like to quickly link to shortened URLs in your templates, stick\n ``\"shorturls\"`` in ``INSTALLED_APPS``, and then in your templates do::\n \n {% load shorturl %}\n ...\n \n (where ``object`` is a model instance).\n \n Alternatively::\n \n {% load shorturl %}\n {% revcanonical object %}\n \n This generates the whole ```` tag for\n you.\n \nThat's it.\n\nIf you'd like more control, keep reading.\n\nSettings\n========\n\nAvailable settings are:\n\n``SHORTEN_MODELS``\n You've seen this one.\n \n``SHORT_BASE_URL``\n If defined, the ``shorturl`` and ``revcanonical`` template tags will\n prefix generated URLs with this value. Use this if you've got a shorter\n domain name you'd like to use for small URLs.\n \n For example, given ``SHORT_BASE_URL = 'http://exm.pl/'``, ``{% shorturl\n obj %}`` would return something like ``http://exm.pl/AbCd``.\n\n``SHORTEN_FULL_BASE_URL``\n The domain to redirect to when redirecting away from the small URL.\n Again, you'll use this if your short URL base and your \"real\" site\n differ.\n \n If not defined, the redirect view will try to guess the proper domain by\n consulting the ``django.contrib.sites`` framework, if installed, or the\n requested domain, if not.\n\n\n``SHORTURLS_DEFAULT_CONVERTER``\n The converter that is used to translate between short URLs and model IDs.\n Defaults to the built in base 62 conversion.\n\n Available converters:\n\n - ``shorturls.baseconv.base62`` Base 62 encoding.\n - ``shorturls.baseconv.base32`` `Douglas Crockford's base 32`_.\n - ``shorturls.baseconv.hexconv`` Hex encoding.\n - ``shorturls.baseconv.bin`` Binary encoding, because why not.\n\n.. _Douglas Crockford's base 32: http://www.crockford.com/wrmg/base32.html", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/bfirsh/django-shorturls", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "django-shorturls", "package_url": "https://pypi.org/project/django-shorturls/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-shorturls/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/bfirsh/django-shorturls" }, "release_url": "https://pypi.org/project/django-shorturls/2.0.0/", "requires_dist": null, "requires_python": null, "summary": "A URL shortening app for Django.", "version": "2.0.0" }, "last_serial": 3392918, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "0423145daff2ad7849183b7a0ee84967", "sha256": "3ce53b00ea4b664d1e023d01c1f3f3c94991c1f091f8a486e1d2e45948183550" }, "downloads": -1, "filename": "django-shorturls-1.0.tar.gz", "has_sig": false, "md5_digest": "0423145daff2ad7849183b7a0ee84967", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7102, "upload_time": "2009-04-13T02:27:57", "url": "https://files.pythonhosted.org/packages/83/93/6033c5fc9c9e1c6460d7c0f23e5c2eeb87d8dd8bc149b33eb170b8086d8e/django-shorturls-1.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "d9e31ddabeeabc30311ba45ede2ec8c1", "sha256": "aebd1e98d859bdf93ec49b28e73d3c414845fe3d9e016c5c4f23f1a8c6444595" }, "downloads": -1, "filename": "django-shorturls-1.0.1.tar.gz", "has_sig": false, "md5_digest": "d9e31ddabeeabc30311ba45ede2ec8c1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7200, "upload_time": "2009-04-13T02:52:50", "url": "https://files.pythonhosted.org/packages/2e/74/14739cd115c4acbd8e312f037f98ddb6ff874c507ba959acc4cdc24dec10/django-shorturls-1.0.1.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "8a3146a62752c8b2a835313ea67db701", "sha256": "8e208df93ea4396039d7bff5eba0d650dd396ce0e2059c9e56bf04721034c9f8" }, "downloads": -1, "filename": "django-shorturls-1.1.0.tar.gz", "has_sig": false, "md5_digest": "8a3146a62752c8b2a835313ea67db701", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7266, "upload_time": "2014-10-31T14:14:47", "url": "https://files.pythonhosted.org/packages/f5/04/4f5e6484826e4072bd7e99497228e22954946931cf36090a12a99261e2e3/django-shorturls-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "e49c14c3d31a598fdcfc534ae8e45b0b", "sha256": "6b09b9356c59721f64a68b6a6239d5c723fee30a5a299dc9480bfefb605a07ff" }, "downloads": -1, "filename": "django-shorturls-1.1.1.tar.gz", "has_sig": false, "md5_digest": "e49c14c3d31a598fdcfc534ae8e45b0b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7291, "upload_time": "2015-09-29T10:42:23", "url": "https://files.pythonhosted.org/packages/84/bd/c028b0773bba0a8c2f8bec43e7cfa460919944fbc819c8120b5bd6794240/django-shorturls-1.1.1.tar.gz" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "747a58ba75486b9fa3ad5233193e0461", "sha256": "382ff617b36fea04981b30457377a46f2034d0940a40a20c6f637c55ea0bda93" }, "downloads": -1, "filename": "django-shorturls-2.0.0.tar.gz", "has_sig": false, "md5_digest": "747a58ba75486b9fa3ad5233193e0461", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7259, "upload_time": "2016-12-15T12:31:04", "url": "https://files.pythonhosted.org/packages/8a/95/90b507492711f780f0df09f19de957b7ebc0fcc20b3582bc44ddd19e8502/django-shorturls-2.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "747a58ba75486b9fa3ad5233193e0461", "sha256": "382ff617b36fea04981b30457377a46f2034d0940a40a20c6f637c55ea0bda93" }, "downloads": -1, "filename": "django-shorturls-2.0.0.tar.gz", "has_sig": false, "md5_digest": "747a58ba75486b9fa3ad5233193e0461", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7259, "upload_time": "2016-12-15T12:31:04", "url": "https://files.pythonhosted.org/packages/8a/95/90b507492711f780f0df09f19de957b7ebc0fcc20b3582bc44ddd19e8502/django-shorturls-2.0.0.tar.gz" } ] }