[Python-modules-commits] r22239 - in packages/python-django-voting/trunk/debian (3 files)
ockham-guest at users.alioth.debian.org
ockham-guest at users.alioth.debian.org
Fri Jun 22 01:02:38 UTC 2012
Date: Friday, June 22, 2012 @ 01:02:36
Author: ockham-guest
Revision: 22239
Fix for Django 1.4 compatibility (Closes: #669488)
Added:
packages/python-django-voting/trunk/debian/patches/django14
Modified:
packages/python-django-voting/trunk/debian/changelog
packages/python-django-voting/trunk/debian/patches/series
Modified: packages/python-django-voting/trunk/debian/changelog
===================================================================
--- packages/python-django-voting/trunk/debian/changelog 2012-06-22 00:25:52 UTC (rev 22238)
+++ packages/python-django-voting/trunk/debian/changelog 2012-06-22 01:02:36 UTC (rev 22239)
@@ -1,5 +1,7 @@
python-django-voting (0.1-2) UNRELEASED; urgency=medium
+ * debian/patches/django14, debian/patches/series:
+ Fix for Django 1.4 compatibility (Closes: #669488)
* debian/control: Bump Standards-Version to 3.9.2.
* debian/copyright: Update to comply with copyright-format 1.0.
Added: packages/python-django-voting/trunk/debian/patches/django14
===================================================================
--- packages/python-django-voting/trunk/debian/patches/django14 (rev 0)
+++ packages/python-django-voting/trunk/debian/patches/django14 2012-06-22 01:02:36 UTC (rev 22239)
@@ -0,0 +1,46 @@
+# Description: Fix some incompatibilities with Django 1.4.
+# Author: Bernhard Reiter <ockham at raz.or.at>
+# Forwarded: http://code.google.com/p/django-voting/issues/detail?id=35
+
+--- a/voting/tests/settings.py
++++ b/voting/tests/settings.py
+@@ -2,8 +2,12 @@
+
+ DIRNAME = os.path.dirname(__file__)
+
+-DATABASE_ENGINE = 'sqlite3'
+-DATABASE_NAME = os.path.join(DIRNAME, 'database.db')
++DATABASES = {
++ 'default' : {
++ 'ENGINE' : 'django.db.backends.sqlite3',
++ 'NAME' : os.path.join(DIRNAME, 'database.db'),
++ }
++}
+
+ #DATABASE_ENGINE = 'mysql'
+ #DATABASE_NAME = 'tagging_test'
+--- a/voting/tests/runtests.py
++++ b/voting/tests/runtests.py
+@@ -1,8 +1,9 @@
+ import os, sys
+ os.environ['DJANGO_SETTINGS_MODULE'] = 'voting.tests.settings'
+
+-from django.test.simple import run_tests
++from django.test.simple import DjangoTestSuiteRunner
+
+-failures = run_tests(None, verbosity=9)
++runner = DjangoTestSuiteRunner(verbosity=9)
++failures = runner.run_tests(None)
+ if failures:
+ sys.exit(failures)
+--- a/voting/managers.py
++++ b/voting/managers.py
+@@ -138,7 +138,7 @@
+ # MySQL has issues with re-using the aggregate function in the
+ # HAVING clause, so we alias the score and use this alias for
+ # its benefit.
+- if settings.DATABASE_ENGINE == 'mysql':
++ if settings.DATABASES['default']['ENGINE'] == 'mysql':
+ having_score = connection.ops.quote_name('score')
+ else:
+ having_score = 'SUM(vote)'
Modified: packages/python-django-voting/trunk/debian/patches/series
===================================================================
--- packages/python-django-voting/trunk/debian/patches/series 2012-06-22 00:25:52 UTC (rev 22238)
+++ packages/python-django-voting/trunk/debian/patches/series 2012-06-22 01:02:36 UTC (rev 22239)
@@ -1,2 +1,3 @@
test_settings
+django14
num_up_down_votes_and_doc
More information about the Python-modules-commits
mailing list