From 700aa2007d1e3d4ad3a67221a0ab84e7ac943205 Mon Sep 17 00:00:00 2001
From: Ben Adida <ben@adida.net>
Date: Sun, 24 Feb 2013 20:13:47 -0800
Subject: [PATCH] started work on upgrading to django 1.4

---
 helios/fixtures/election.json           | 2 ++
 helios/tests.py                         | 2 +-
 helios_auth/auth_systems/openid/util.py | 2 +-
 requirements.txt                        | 2 +-
 settings.py                             | 7 +++----
 5 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/helios/fixtures/election.json b/helios/fixtures/election.json
index b219c0d..cd7a616 100644
--- a/helios/fixtures/election.json
+++ b/helios/fixtures/election.json
@@ -8,6 +8,8 @@
             "name" : "Test Election",
             "election_type" : "election",
             "use_advanced_audit_features" : true,
+	    "created_at" : "2013-02-22 12:00:00",
+	    "modified_at" : "2013-02-22 12:00:00",
             "private_p" : false,
             "description" : "test description",
             "public_key" : null,
diff --git a/helios/tests.py b/helios/tests.py
index 3f1e63d..33ae43b 100644
--- a/helios/tests.py
+++ b/helios/tests.py
@@ -267,7 +267,7 @@ class CastVoteModelTests(TestCase):
         pass
 
 class DatatypeTests(TestCase):
-    fixtures = ['election.json']
+    fixtures = ['users.json', 'election.json']
 
     def setUp(self):
         self.election = models.Election.objects.all()[0]
diff --git a/helios_auth/auth_systems/openid/util.py b/helios_auth/auth_systems/openid/util.py
index 265cedb..13cd063 100644
--- a/helios_auth/auth_systems/openid/util.py
+++ b/helios_auth/auth_systems/openid/util.py
@@ -41,7 +41,7 @@ def getOpenIDStore(filestore_path, table_prefix):
     The result of this function should be passed to the Consumer
     constructor as the store parameter.
     """
-    if not settings.DATABASE_ENGINE:
+    if not settings.DATABASES['default'].ENGINE:
         return FileOpenIDStore(filestore_path)
 
     # Possible side-effect: create a database connection if one isn't
diff --git a/requirements.txt b/requirements.txt
index 18d636b..2387077 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,4 +1,4 @@
-Django==1.3.7
+Django==1.4.5
 South==0.7.3
 amqplib==1.0.2
 anyjson==0.3.1
diff --git a/settings.py b/settings.py
index a1bfc89..7bc42aa 100644
--- a/settings.py
+++ b/settings.py
@@ -53,16 +53,15 @@ MEDIA_URL = ''
 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
 # trailing slash.
 # Examples: "http://foo.com/media/", "/media/".
-ADMIN_MEDIA_PREFIX = '/media/'
+STATIC_URL = '/media/'
 
 # Make this unique, and don't share it with anybody.
 SECRET_KEY = get_from_env('SECRET_KEY', 'replaceme')
 
 # List of callables that know how to import templates from various sources.
 TEMPLATE_LOADERS = (
-    'django.template.loaders.filesystem.load_template_source',
-    'django.template.loaders.app_directories.load_template_source',
-#     'django.template.loaders.eggs.load_template_source',
+    'django.template.loaders.filesystem.Loader',
+    'django.template.loaders.app_directories.Loader'
 )
 
 MIDDLEWARE_CLASSES = (
-- 
GitLab