mirror of
https://github.com/ansible/awx.git
synced 2026-03-09 13:39:27 -02:30
Various Django cleanup
This commit is contained in:
23
Makefile
Normal file
23
Makefile
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
setup:
|
||||||
|
ansible-playbook app_setup/setup.yml -i "127.0.0.1," -c local -e working_dir=`pwd`
|
||||||
|
|
||||||
|
syncdb:
|
||||||
|
python acom/manage.py syncdb
|
||||||
|
|
||||||
|
runserver:
|
||||||
|
python acom/manage.py runserver
|
||||||
|
|
||||||
|
# already done and should not have to happen again:
|
||||||
|
#
|
||||||
|
#south_init:
|
||||||
|
# PYTHON_PATH=./acom python acom/manage.py schemamigration main --initial
|
||||||
|
|
||||||
|
dbchange:
|
||||||
|
PYTHON_PATH=./acom python acom/manage.py schemamigration main --auto
|
||||||
|
|
||||||
|
migrate:
|
||||||
|
PYTHON_PATH=./acom python acom/manage.py migrate main --auto
|
||||||
|
|
||||||
|
test:
|
||||||
|
PYTHON_PATH=./acom python acom/manage.py test main
|
||||||
|
|
||||||
@@ -9,15 +9,6 @@ from django.test import TestCase
|
|||||||
|
|
||||||
class SimpleTest(TestCase):
|
class SimpleTest(TestCase):
|
||||||
def test_basic_addition(self):
|
def test_basic_addition(self):
|
||||||
"""
|
|
||||||
Tests that 1 + 1 always equals 2.
|
|
||||||
"""
|
|
||||||
self.failUnlessEqual(1 + 1, 2)
|
self.failUnlessEqual(1 + 1, 2)
|
||||||
|
|
||||||
__test__ = {"doctest": """
|
|
||||||
Another way to test that 1 + 1 is equal to 2.
|
|
||||||
|
|
||||||
>>> 1 + 1 == 2
|
|
||||||
True
|
|
||||||
"""}
|
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -61,6 +61,6 @@
|
|||||||
command=syncdb
|
command=syncdb
|
||||||
app_path=${working_dir}/acom
|
app_path=${working_dir}/acom
|
||||||
|
|
||||||
#- name: run south migrations
|
- name: run south migrations
|
||||||
# command: python ${working_dir}/acom/manage.py migrate db_migrate
|
command: python ${working_dir}/acom/manage.py migrate main
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
# Django settings for acom project.
|
# Django settings for acom project.
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
TEMPLATE_DEBUG = DEBUG
|
TEMPLATE_DEBUG = DEBUG
|
||||||
|
|
||||||
@@ -20,6 +22,11 @@ DATABASES = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if 'test' in sys.argv:
|
||||||
|
DATABASES['default'] = {
|
||||||
|
'ENGINE': 'django.db.backends.sqlite3'
|
||||||
|
}
|
||||||
|
|
||||||
# Local time zone for this installation. Choices can be found here:
|
# Local time zone for this installation. Choices can be found here:
|
||||||
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
|
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
|
||||||
# although not all choices may be available on all operating systems.
|
# although not all choices may be available on all operating systems.
|
||||||
|
|||||||
Reference in New Issue
Block a user