Cleanup and mptt update to support Django 1.8.

This commit is contained in:
Martin Mahner 2015-08-12 05:59:22 +02:00
parent 9beb2c3995
commit 457bef787a
5 changed files with 26 additions and 21 deletions

View file

@ -1,10 +1,15 @@
Changelog Changelog
========= =========
2.9 (DEV) 2.9 (DEV)
---------------- ----------------
* Fully Django 1.7 support * Full Django 1.7 support
* Full Django 1.8 support
* New Django migrations, with fallback to South migrations if South is
installed.
* Added i18n support and several languages * Added i18n support and several languages
* More settings can be overrridden, like the jQuery URL, site name and wether * More settings can be overrridden, like the jQuery URL, site name and wether
you want to enable Gthub Gist. you want to enable Gthub Gist.

View file

@ -5,8 +5,8 @@
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Project dependencies # Project dependencies
django==1.7.1 django==1.8.3
django-mptt==0.6.1 django-mptt==0.7.4
pygments==2.0.1 pygments==2.0.1
requests==2.5.1 requests==2.5.1

View file

@ -5,7 +5,7 @@ from django.conf import settings
if not settings.configured: if not settings.configured:
settings.configure( settings.configure(
DATABASES = { DATABASES={
'default': { 'default': {
'ENGINE': 'django.db.backends.sqlite3', 'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'dev.db', 'NAME': 'dev.db',
@ -17,7 +17,7 @@ if not settings.configured:
'mptt', 'mptt',
'dpaste', 'dpaste',
], ],
MIDDLEWARE_CLASSES = ( MIDDLEWARE_CLASSES=(
'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware',
), ),
STATIC_ROOT='/tmp/dpaste_test_static/', STATIC_ROOT='/tmp/dpaste_test_static/',
@ -26,8 +26,6 @@ if not settings.configured:
) )
def runtests(*test_args): def runtests(*test_args):
from django.test.simple import DjangoTestSuiteRunner
# New Django 1.7 app registry # New Django 1.7 app registry
try: try:
from django import setup from django import setup
@ -35,7 +33,13 @@ def runtests(*test_args):
except ImportError: except ImportError:
pass pass
test_runner = DjangoTestSuiteRunner(verbosity=1) # New Django 1.8 test runner
try:
from django.test.runner import DiscoverRunner as TestRunner
except ImportError:
from django.test.simple import DjangoTestSuiteRunner as TestRunner
test_runner = TestRunner(verbosity=1)
failures = test_runner.run_tests(['dpaste', ]) failures = test_runner.run_tests(['dpaste', ])
if failures: if failures:
sys.exit(failures) sys.exit(failures)

View file

@ -50,7 +50,7 @@ setup(
include_package_data=True, include_package_data=True,
install_requires=[ install_requires=[
'django>=1.4', 'django>=1.4',
'django-mptt>=0.6.0', 'django-mptt>=0.7.4',
'pygments>=1.6', 'pygments>=1.6',
'requests>=2.0.0', 'requests>=2.0.0',
], ],

20
tox.ini
View file

@ -2,26 +2,22 @@
toxworkdir=/tmp/tox/dpaste toxworkdir=/tmp/tox/dpaste
envlist= envlist=
py27-django-1.4, py27-django-1.4,
py27-django-1.6,
py27-django-1.7, py27-django-1.7,
py33-django-1.7, py27-django-latest,
py34-django-1.7, py34-django-latest
[testenv] [testenv]
commands= commands=
python runtests.py python runtests.py
[testenv:py27-django-1.4] [testenv:py27-django-1.4]
deps=django==1.4.16 deps=django==1.4.21
[testenv:py27-django-1.6]
deps=django==1.6.8
[testenv:py27-django-1.7] [testenv:py27-django-1.7]
deps=django==1.7.1 deps=django==1.7.9
[testenv:py33-django-1.7] [testenv:py27-django-latest]
deps=django==1.7.1 deps=django==1.8.3
[testenv:py34-django-1.7] [testenv:py34-django-latest]
deps=django==1.7.1 deps=django==1.8.3