Refactor the basic environment setup code out of django_test_utils.py into setup_django_environment.py, and rename django_test_utils.py to setup_test_environment.py.  Also changed the environment setup code to run at import time.  This makes it easy for scripts, both test and non-test, to use Django models without running through manage.py.  The idea is that scripts will import setup_django_environment before importing Django code (somewhat akin to common.py), and test code will subsequently import setup_test_environment.



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2297 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/frontend/setup_django_environment.py b/frontend/setup_django_environment.py
new file mode 100644
index 0000000..28d3630
--- /dev/null
+++ b/frontend/setup_django_environment.py
@@ -0,0 +1,5 @@
+from django.core import management
+import common
+from autotest_lib.frontend import settings
+
+management.setup_environ(settings)