[autotest] Bump django to 1.5.

This includes a mysql-python version bump to get rid of a warning
message, and a few fixes throughout the codebase to get things working
again under django 1.5.

TEST=AFE works, RPCs work, run_suite works, scheduler works
BUG=chromium:232388
DEPLOY=apache,scheduler

Change-Id: Ie0d7f5fd1203a25bdedb78d31778d8373aaf6ff5
Reviewed-on: https://gerrit.chromium.org/gerrit/48402
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Reviewed-by: Brian Harring <ferringb@chromium.org>
Tested-by: Alex Miller <milleral@chromium.org>
Commit-Queue: Alex Miller <milleral@chromium.org>
diff --git a/frontend/manage.py b/frontend/manage.py
index faf9daf..8ae4f17 100755
--- a/frontend/manage.py
+++ b/frontend/manage.py
@@ -1,12 +1,8 @@
 #!/usr/bin/env python
-import common
-from django.core.management import execute_manager
-try:
-    import settings # Assumed to be in the same directory.
-except ImportError:
-    import sys
-    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 sys
+import setup_django_environment
 
 if __name__ == "__main__":
-    execute_manager(settings)
+    from django.core.management import execute_from_command_line
+
+    execute_from_command_line(sys.argv)