Merged in hirokiky/django-admin-tools/supportdj16 (pull request #27) and also added python3.3/django1.6 environment
This commit is contained in:
commit
ea17fb072d
|
@ -6,12 +6,28 @@ import sys
|
|||
path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
|
||||
sys.path.insert(0, path)
|
||||
|
||||
from django.core.management import execute_manager
|
||||
try:
|
||||
import settings # Assumed to be in the same directory.
|
||||
except ImportError:
|
||||
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__)
|
||||
sys.exit(1)
|
||||
import django
|
||||
|
||||
|
||||
def manage_16ormore():
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
|
||||
from django.core.management import execute_from_command_line
|
||||
|
||||
execute_from_command_line(sys.argv)
|
||||
|
||||
|
||||
def manage_15orless():
|
||||
from django.core.management import execute_manager
|
||||
try:
|
||||
import settings # Assumed to be in the same directory.
|
||||
except ImportError:
|
||||
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__)
|
||||
sys.exit(1)
|
||||
|
||||
execute_manager(settings)
|
||||
|
||||
if __name__ == "__main__":
|
||||
execute_manager(settings)
|
||||
if django.VERSION > (1, 6):
|
||||
manage_16ormore()
|
||||
else:
|
||||
manage_15orless()
|
||||
|
|
|
@ -146,10 +146,11 @@ INSTALLED_APPS = [
|
|||
|
||||
try:
|
||||
import django_coverage
|
||||
TEST_RUNNER = 'django_coverage.coverage_runner.run_tests'
|
||||
TEST_RUNNER = 'django_coverage.coverage_runner.CoverageRunner'
|
||||
COVERAGE_REPORT_HTML_OUTPUT_DIR = os.path.join(PROJECT_PATH, '_coverage')
|
||||
except ImportError:
|
||||
pass
|
||||
TEST_RUNNER = 'django.test.simple.DjangoTestSuiteRunner'
|
||||
|
||||
|
||||
ADMIN_TOOLS_INDEX_DASHBOARD = 'test_proj.dashboard.CustomIndexDashboard'
|
||||
ADMIN_TOOLS_MENU = 'test_proj.menu.CustomMenu'
|
||||
|
|
14
tox.ini
14
tox.ini
|
@ -1,5 +1,5 @@
|
|||
[tox]
|
||||
envlist = py26-dj13, py27-dj14, py27-dj15
|
||||
envlist = py26-dj13, py27-dj14, py27-dj15, py27-dj16, py33-dj16
|
||||
|
||||
[testenv:py26-dj13]
|
||||
basepython = python2.6
|
||||
|
@ -19,6 +19,18 @@ deps =
|
|||
south
|
||||
django==1.5
|
||||
|
||||
[testenv:py27-dj16]
|
||||
basepython = python2.7
|
||||
deps =
|
||||
south
|
||||
django==1.6
|
||||
|
||||
[testenv:py33-dj16]
|
||||
basepython = python3.3
|
||||
deps =
|
||||
south
|
||||
django==1.6
|
||||
|
||||
[testenv]
|
||||
commands =
|
||||
python -V
|
||||
|
|
Loading…
Reference in New Issue