Upgrade from Django 0.96 to Django 1.0.2.

Risk: high (framework change)
Visibility: medium

Signed-off-by: James Ren <jamesren@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3457 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/frontend/urls.py b/frontend/urls.py
index 15554d2..3aeb5d7 100644
--- a/frontend/urls.py
+++ b/frontend/urls.py
@@ -1,21 +1,25 @@
 from django.conf.urls.defaults import *
 from django.conf import settings
 
+# The next two lines enable the admin and load each admin.py file:
+from django.contrib import admin
+admin.autodiscover()
+
 RE_PREFIX = '^' + settings.URL_PREFIX
 
 handler500 = 'frontend.afe.views.handler500'
 
 pattern_list = (
-    (RE_PREFIX + r'admin/', include('django.contrib.admin.urls')),
-    (RE_PREFIX, include('frontend.afe.urls')),
-)
+        (RE_PREFIX + r'admin/(.*)', admin.site.root),
+        (RE_PREFIX, include('frontend.afe.urls')),
+    )
 
 debug_pattern_list = (
-    # redirect /tko and /results to local apache server
-    (r'^(?P<path>(tko|results)/.*)$',
-     'frontend.afe.views.redirect_with_extra_data',
-     {'url': 'http://%(server_name)s/%(path)s?%(getdata)s'}),
-)
+        # redirect /tko and /results to local apache server
+        (r'^(?P<path>(tko|results)/.*)$',
+         'frontend.afe.views.redirect_with_extra_data',
+         {'url': 'http://%(server_name)s/%(path)s?%(getdata)s'}),
+    )
 
 if settings.DEBUG:
   pattern_list += debug_pattern_list