From 211aaae17e847eb8c6332f48579cacae9f55d4e0 Mon Sep 17 00:00:00 2001
From: Ben Adida <ben@adida.net>
Date: Fri, 11 Sep 2009 18:55:11 -0700
Subject: [PATCH] updates

---
 .gitignore                  |  1 +
 django-gae.py               |  3 +++
 helios                      |  2 +-
 initialization.py.sample    | 19 +++++++++++++++++++
 settings.py.sample          |  6 +++---
 single-election/__init__.py | 13 -------------
 6 files changed, 27 insertions(+), 17 deletions(-)
 create mode 100644 initialization.py.sample

diff --git a/.gitignore b/.gitignore
index 4defc12..7881996 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
 app.yaml
 settings.py
+initialization.py
 *.pyc
 .DS_Store
 *~
\ No newline at end of file
diff --git a/django-gae.py b/django-gae.py
index 3f20710..0f330f7 100644
--- a/django-gae.py
+++ b/django-gae.py
@@ -36,6 +36,9 @@ import django.dispatch.dispatcher
 def main():
   # Create a Django application for WSGI.
   application = django.core.handlers.wsgi.WSGIHandler()
+  
+  # if there's initialiation, run it
+  import initialization
 
   # Run the WSGI CGI handler with that application.
   util.run_wsgi_app(application)
diff --git a/helios b/helios
index d7e2074..45dc71e 160000
--- a/helios
+++ b/helios
@@ -1 +1 @@
-Subproject commit d7e20746a289a57def46920c108931ecba7bae0b
+Subproject commit 45dc71e176ec0bd814f2b46f07ef6012d77dff75
diff --git a/initialization.py.sample b/initialization.py.sample
new file mode 100644
index 0000000..f873c29
--- /dev/null
+++ b/initialization.py.sample
@@ -0,0 +1,19 @@
+"""
+Initialization for the system
+"""
+
+
+import helios
+import auth
+import auth.models
+
+#from single-election import glue
+
+helios.TEMPLATE_BASE = "single-election/templates/base.html"
+helios.ADMIN_ONLY = True
+helios.ADMIN = auth.models.User.get_or_create(user_type = 'password', user_id = 'benadida', info={'password':'test'})
+
+# authentication limited to passwords
+auth.ENABLED_AUTH_SYSTEMS = ['cas', 'password']
+auth.DEFAULT_AUTH_SYSTEM = 'cas'
+
diff --git a/settings.py.sample b/settings.py.sample
index 0b7b86a..9710417 100644
--- a/settings.py.sample
+++ b/settings.py.sample
@@ -135,9 +135,9 @@ SINGLE_ELECTION_SHORT_NAME = 'FILL-ME-IN'
 
 SINGLE_ELECTION_PARAMS = {
   'short_name' : SINGLE_ELECTION_SHORT_NAME,
-  'name' : 'IACR 2009 Election',
-  'description' : 'Election for the IACR Board - 2009',
-  'uuid' : 'iacr',
+  'name' : SINGLE_ELECTION_TITLE,
+  'description' : 'Election for the Fall 2009 Princeton Freshman Class Officers',
+  'uuid' : SINGLE_ELECTION_UUID,
   'openreg': False,
   'tally_type': 'homomorphic',
   'ballot_type': 'homomorphic',
diff --git a/single-election/__init__.py b/single-election/__init__.py
index 0da2967..ac3c779 100644
--- a/single-election/__init__.py
+++ b/single-election/__init__.py
@@ -2,16 +2,3 @@
 This django app is meant only to connect the pieces of Helios and Auth that are specific to single election
 """
 
-import glue
-
-import helios
-import auth
-import auth.models
-
-helios.TEMPLATE_BASE = "single-election/templates/base.html"
-helios.ADMIN_ONLY = True
-helios.ADMIN = auth.models.User.get_or_create(user_type = 'password', user_id = 'benadida', info={'password':'test'})
-
-# authentication limited to passwords
-auth.ENABLED_AUTH_SYSTEMS = ['cas', 'password']
-auth.DEFAULT_AUTH_SYSTEM = 'cas'
\ No newline at end of file
-- 
GitLab