debian/0000755000000000000000000000000011676222134007172 5ustar debian/docs0000644000000000000000000000000711676143654010053 0ustar README debian/rules0000755000000000000000000000037611676143654010271 0ustar #!/usr/bin/make -f %: dh $@ --with python2 override_dh_auto_clean: # remove AppleDouble encoded Macintosh files find -name "._*" -exec rm -rf {} + # remove PKG-INFO rm -f PKG-INFO # remove egg rm -rf src/django_shorturls.egg-info dh_auto_clean debian/compat0000644000000000000000000000000211676143654010401 0ustar 7 debian/control0000644000000000000000000000161111676221723010577 0ustar Source: python-django-shorturls Section: python Priority: optional Maintainer: Janos Guljas Uploaders: Debian Python Modules Team DM-Upload-Allowed: yes Build-Depends: debhelper (>= 7.0.50~), python-all, python-support, python-setuptools XS-Python-Version: >= 2.5 Standards-Version: 3.9.2 Homepage: http://pypi.python.org/pypi/django-shorturls/ Vcs-Svn: svn://svn.debian.org/python-modules/packages/python-django-shorturls/trunk Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/python-django-shorturls/trunk/ Package: python-django-shorturls Architecture: all XB-Python-Version: ${python:Versions} Depends: ${misc:Depends}, ${python:Depends}, python-django Description: Short URL handler for Django applications Django-shorturls is a custom URL shortening application for Django, including easy rev=canonical support. debian/watch0000644000000000000000000000014111676143654010230 0ustar version=3 http://pypi.python.org/packages/source/d/django-shorturls/django-shorturls-(.*).tar.gz debian/copyright0000644000000000000000000000345211676143654011142 0ustar Format: http://anonscm.debian.org/viewvc/dep/web/deps/dep5.mdwn?revision=174 Upstream-Name: django-shorturls Upstream-Contact: Jacob Kaplan-Moss Source: https://github.com/jacobian/django-shorturls/ Files: * Copyright: 2008 Simon Willison and Jacob Kaplan-Moss License: BSD Files: debian/* Copyright: 2011 Janos Guljas License: BSD License: BSD Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the PyFilesystem nor the names of his contributors may be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. debian/patches/0000755000000000000000000000000011676221740010623 5ustar debian/patches/series0000644000000000000000000000014111676143654012043 0ustar 0001-Corrected-sample-usage-to-convert-back-to-decimal.patch 01_doc-sync.diff 02_setup-sync.diff debian/patches/0001-Corrected-sample-usage-to-convert-back-to-decimal.patch0000644000000000000000000000126211676143654023535 0ustar From de5ab6d2a21875b29a5d456551dbb46e7971fcbc Mon Sep 17 00:00:00 2001 From: Jonathan Street Date: Mon, 4 Jul 2011 07:30:20 -0700 Subject: [PATCH] Corrected sample usage to convert back to decimal. --- src/shorturls/baseconv.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/shorturls/baseconv.py b/src/shorturls/baseconv.py index ba2f759..1e22ed1 100644 --- a/src/shorturls/baseconv.py +++ b/src/shorturls/baseconv.py @@ -8,7 +8,7 @@ Sample usage: >>> base20 = BaseConverter('0123456789abcdefghij') >>> base20.from_decimal(1234) '31e' ->>> base20.from_decimal('31e') +>>> base20.to_decimal('31e') 1234 """ -- 1.7.5.4 debian/patches/02_setup-sync.diff0000644000000000000000000000107011676143654014075 0ustar Description: Apply changes in setup.py from the git Author: Janos Guljas Last-Update: 2010-01-06 --- a/setup.py +++ b/setup.py @@ -22,10 +22,11 @@ setup( classifiers = [ 'Development Status :: 4 - Beta', + 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', - 'Topic :: Internet', + 'Topic :: Internet :: WWW/HTTP', ] ) \ No newline at end of file debian/patches/01_doc-sync.diff0000644000000000000000000001504511676143654013510 0ustar Description: Apply changes in README and add LICENCE from the git Author: Janos Guljas Last-Update: 2010-01-06 --- /dev/null +++ b/LICENCE @@ -0,0 +1,27 @@ +Copyright (c) 2008 Simon Willison and Jacob Kaplan-Moss +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + 3. Neither the name of this project nor the names of its contributors may be + used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --- a/README +++ b/README @@ -1,7 +1,7 @@ django-shorturls ================ -A custom URL shortening app for Django, including easy ``rev=cannonical`` +A custom URL shortening app for Django, including easy ``rev=canonical`` support. Most code was originally by Simon Willison; see @@ -15,43 +15,43 @@ Usage So, you want to host your own short URLs on your Django site: - 1. In your settings, define a set of prefixes for short URLs:: +1. In your settings, define a set of prefixes for short URLs:: - SHORTEN_MODELS = { - 'A': 'myapp.animal', - 'V': 'myapp.vegetable', - 'M': 'myapp.mineral' - } + SHORTEN_MODELS = { + 'A': 'myapp.animal', + 'V': 'myapp.vegetable', + 'M': 'myapp.mineral' + } + + The keys are string prefixes; they can be any string, actually, + but since we're going for short a single character is probably good. + + Values are the (hopefully-familiar) ``"."`` used + by Django to identify a model. Remember: ``app-name`` is the + (case-sensitive) last bit of your app's name in ``INSTALLED_APPS``, and + ```` is your model class's name, lowercased. + + Make sure your models have a ``get_absolute_url()`` method defined. - The keys are string prefixes; they can be any string, actually, - but since we're going for short a single character is probably good. - - Values are the (hopefully-familiar) ``"."`` used - by Django to identify a model. Remember: ``app-name`` is the - (case-sensitive) last bit of your app's name in ``INSTALLED_APPS``, and - ```` is your model class's name, lowercased. +2. Wire up the redirect view by adding to your URLconf:: + + ('^short/', include('shorturls.urls')) - Make sure your models have a ``get_absolute_url()`` method defined. +3. If you'd like to quickly link to shortened URLs in your templates, stick + ``"shorturls"`` in ``INSTALLED_APPS``, and then in your templates do:: + + {% load shorturl %} + ... + + (where ``object`` is a model instance). + + Alternatively:: + + {% load shorturl %} + {% revcanonical object %} - 2. Wire up the redirect view by adding to your URLconf:: - - ('^short/', include('shorturls.urls')) - - 3. If you'd like to quickly link to shortened URLs in your templates, stick - ``"shorturls"`` in ``INSTALLED_APPS``, and then in your templates do:: - - {% load shorturls %} - ... - - (where ``object`` is a model instance). - - Alternatively:: - - {% load shorturls %} - {% recanonical object %} - - This generates the whole ```` tag for - you. + This generates the whole ```` tag for + you. That's it. @@ -62,22 +62,22 @@ Settings Available settings are: - ``SHORTEN_MODELS`` - You've seen this one. - - ``SHORT_BASE_URL`` - If defined, the ``shorturl`` and ``revcanonical`` template tags will - prefix generated URLs with this value. Use this if you've got a shorter - domain name you'd like to use for small URLs. - - For example, given ``SHORT_BASE_URL = 'http://exm.pl/'``, ``{% shorturl - obj %}`` would return something like ``http://exm.pl/AbCd``. - - ``SHORTEN_FULL_BASE_URL`` - The domain to redirect to when redirecting away from the small URL. - Again, you'll use this if your short URL base and your "real" site - differ. - - If not defined, the redirect view will try to guess the proper domain by - consulting the ``django.contrib.sites`` framework, if installed, or the - requested domain, if not. \ No newline at end of file +``SHORTEN_MODELS`` + You've seen this one. + +``SHORT_BASE_URL`` + If defined, the ``shorturl`` and ``revcanonical`` template tags will + prefix generated URLs with this value. Use this if you've got a shorter + domain name you'd like to use for small URLs. + + For example, given ``SHORT_BASE_URL = 'http://exm.pl/'``, ``{% shorturl + obj %}`` would return something like ``http://exm.pl/AbCd``. + +``SHORTEN_FULL_BASE_URL`` + The domain to redirect to when redirecting away from the small URL. + Again, you'll use this if your short URL base and your "real" site + differ. + + If not defined, the redirect view will try to guess the proper domain by + consulting the ``django.contrib.sites`` framework, if installed, or the + requested domain, if not. debian/changelog0000644000000000000000000000227711676221723011057 0ustar python-django-shorturls (1.0.1-3) unstable; urgency=low * Switch to dh_python2. * Change debian/copyright to be DEP5 compatible. * Added dependency to python-django. * Fixed Vcs-Svn and Vcs-Browser values. * Bump standards to 3.9.2. No changes needed. * Changed my email address. * Added debian/source/local-options. * Remove debian/README.source. * Fix description-synopsis-starts-with-article warning. * Add DM-Upload-Allowed control field. * Add python-all to build-depends to fix "missing build dependency for dh addon" lintian warning. -- Janos Guljas Mon, 26 Dec 2011 22:50:41 +0100 python-django-shorturls (1.0.1-2) unstable; urgency=low * Changed Long description (Closes: #563574) * New patch 01_doc-sync.diff: - Apply changes in README from the git - Add LICENCE from the git * New patch 02_setup-sync.diff: - Apply changes in setup.py from the git * Switch to dpkg-source 3.0 (quilt) format -- Janos Guljas Mon, 18 Jan 2010 21:54:26 +0100 python-django-shorturls (1.0.1-1) unstable; urgency=low * Initial release. (Closes: #560254) -- Janos Guljas Thu, 10 Dec 2009 00:41:49 +0100 debian/source/0000755000000000000000000000000011676221740010474 5ustar debian/source/format0000644000000000000000000000001411676143654011711 0ustar 3.0 (quilt)