diff --git a/.gitignore b/.gitignore index 4defc1280f22a26b7735d3b78423f32ee68ef0f6..788199685067a27f3f43c0cff667a8a59a7f3b99 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 3f207101c6b3149ebf26b860f354fe1190d0e7c3..0f330f72b47636aac61573756c042d7e80d1b182 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 d7e20746a289a57def46920c108931ecba7bae0b..45dc71e176ec0bd814f2b46f07ef6012d77dff75 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 0000000000000000000000000000000000000000..f873c2927d1d7de6998fd41eba3f20f9d4fab1c2 --- /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 0b7b86a18bba330030ab1b8c1052785373f2efe5..97104172af7914a34f90f8c2c196c3a37567d85a 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 0da2967ddc1309ad38841a1feae25b6d64fd6adc..ac3c7795e58699d4abecde988a6b60993602ae41 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