debian/0000755000000000000000000000000011765656666007216 5ustar debian/compat0000644000000000000000000000000211517436341010371 0ustar 7 debian/docs0000644000000000000000000000002011625272665010045 0ustar docs README.txt debian/watch0000644000000000000000000000014211625274305010221 0ustar version=3 http://pypi.python.org/packages/source/d/django-localeurl/ django-localeurl-(.*).tar.gz debian/patches/0000755000000000000000000000000011765656165010637 5ustar debian/patches/series0000644000000000000000000000011611745277453012047 0ustar fix-tests-for-django-1.4.patch fix-monkey-patching-urlresolvers.reverse.patch debian/patches/fix-monkey-patching-urlresolvers.reverse.patch0000644000000000000000000000056711745300214021743 0ustar Description: Workaround for monkey-patching urlresolvers.reverse Django function Author: Janos Guljas Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=665908 Last-Update: 2012-04-23 --- a/localeurl/__init__.py +++ b/localeurl/__init__.py @@ -0,0 +1,3 @@ +from models import django_reverse, patch_reverse +if not django_reverse: + patch_reverse() debian/patches/fix-tests-for-django-1.4.patch0000644000000000000000000000376311745267221016130 0ustar Description: Fix tests for Django 1.4. Author: Carl Meyer Last-Update: 2012-01-31 diff -r ab067c22e92a48cc26bd8cefea41bb4804c0f990 -r 8e600e6b30cf6c0de88f0416b2b519cb1a81eca3 localeurl/tests/test_utils.py --- a/localeurl/tests/test_utils.py Tue Jan 31 14:39:52 2012 -0700 +++ b/localeurl/tests/test_utils.py Tue Jan 31 14:40:05 2012 -0700 @@ -2,6 +2,10 @@ Test utilities. """ +try: + from cStringIO import StringIO +except ImportError: + from StringIO import StringIO from django.conf import settings as django_settings from django.core.handlers.wsgi import WSGIRequest @@ -50,6 +54,26 @@ +class FakePayload(object): + """ + A wrapper around StringIO that restricts what can be read since data from + the network can't be seeked and cannot be read outside of its content + length. This makes sure that views can't do anything under the test client + that wouldn't work in Real Life. + """ + def __init__(self, content): + self.__content = StringIO(content) + self.__len = len(content) + + def read(self, num_bytes=None): + if num_bytes is None: + num_bytes = self.__len or 0 + assert self.__len >= num_bytes, "Cannot read more than the available bytes from the HTTP incoming data." + content = self.__content.read(num_bytes) + self.__len -= num_bytes + return content + + class RequestFactory(Client): """ Class that lets you create mock Request objects for use in testing. @@ -83,6 +107,13 @@ 'SERVER_NAME': 'testserver', 'SERVER_PORT': 80, 'SERVER_PROTOCOL': 'HTTP/1.1', + 'wsgi.version': (1,0), + 'wsgi.url_scheme': 'http', + 'wsgi.input': FakePayload(''), + 'wsgi.errors': self.errors, + 'wsgi.multiprocess': True, + 'wsgi.multithread': False, + 'wsgi.run_once': False, } environ.update(self.defaults) environ.update(request) debian/rules0000755000000000000000000000023211625276651010256 0ustar #!/usr/bin/make -f %: dh $@ --with python2 override_dh_auto_test: for pyvers in $(shell pyversions -vr); do \ python$$pyvers setup.py test; \ done debian/control0000644000000000000000000000327111745301273010577 0ustar Source: python-django-localeurl Section: python Priority: optional Maintainer: Janos Guljas Uploaders: Debian Python Modules Team DM-Upload-Allowed: yes Build-Depends: debhelper (>= 7.0.50~), python-all (>= 2.5), python-setuptools, python-django Standards-Version: 3.9.3 Homepage: http://packages.python.org/django-localeurl/ Vcs-Svn: svn://svn.debian.org/python-modules/packages/python-django-localeurl/trunk Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/python-django-localeurl/trunk/ Package: python-django-localeurl Architecture: all Depends: ${misc:Depends}, ${python:Depends}, python-django Provides: ${python:Provides} Description: Django application allows the language be set in the URL The localeurl Django application allows you to specify the language of a page in the URL. Using localeurl, without modifying your URLconfs, you can have URLs like this: http://www.example.com/nl/company/profile. Any URLs without a language prefix will be redirected to add the prefix for the default language (or, optionally, the language preferred in the user’s browser settings). . Some reasons for using localeurl: . * Search engines will index all languages. * Every page should have a unique URL. If you feel that different languages means different pages, then each language should get its own unique URL. * If you don’t set the language via the URL, setting the language for the website should be done using a POST request (because it influences subsequent page views, see Django ticket #3651). You might prefer a simple link for changing the language, and localeurl allows this. debian/copyright0000644000000000000000000000431111745301660011123 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: django-localeurl Upstream-Contact: Joost Cassee Source: https://bitbucket.org/carljm/django-localeurl Files: * Copyright: 2008-2010 Joost Cassee and contributors License: MIT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: . The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Files: debian/* Copyright: 2011 Janos Guljas License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA . On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. debian/changelog0000644000000000000000000000163111765656666011071 0ustar python-django-localeurl (1.5-3) unstable; urgency=low * debian/source/options - Ignore django_localeurl.egg-info changes after build. (Closes: #671419) -- Janos Guljas Tue, 12 Jun 2012 17:13:04 +0200 python-django-localeurl (1.5-2) unstable; urgency=low * Add patches/fix-tests-for-django-1.4.patch (Closes: #669484) - Fix tests for Django 1.4. * Add patches/fix-monkey-patching-urlresolvers.reverse.patch (Closes: #665908) - Workaround for monkey-patching urlresolvers.reverse Django function. * debian/copyright: - Fix dep5 syntax. - Update Format link. * Bump standards to 3.9.3. * Add DM-Upload-Allowed control field. -- Janos Guljas Mon, 23 Apr 2012 18:33:37 +0200 python-django-localeurl (1.5-1) unstable; urgency=low * Initial release. (Closes: #572638) -- Janos Guljas Thu, 25 Aug 2011 00:23:08 +0200 debian/source/0000755000000000000000000000000011765656232010503 5ustar debian/source/options0000644000000000000000000000005111754763023012110 0ustar extend-diff-ignore = "^[^/]+\.egg-info/" debian/source/format0000644000000000000000000000001411517436341011701 0ustar 3.0 (quilt)