From 49cabff37b74b6b98c85c137955993fa7bd4b7aa Mon Sep 17 00:00:00 2001 From: Ben Adida <ben@adida.net> Date: Sun, 2 May 2010 13:16:58 -0700 Subject: [PATCH] updated settings sample --- settings.py.sample | 89 +++++++++++----------------------------------- 1 file changed, 21 insertions(+), 68 deletions(-) diff --git a/settings.py.sample b/settings.py.sample index a8e3038..64c1aaf 100644 --- a/settings.py.sample +++ b/settings.py.sample @@ -1,18 +1,3 @@ -# Copyright 2008 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Django settings for google-app-engine-django project. import os @@ -25,8 +10,8 @@ ADMINS = ( MANAGERS = ADMINS -DATABASE_ENGINE = 'appengine' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. -DATABASE_NAME = '' # Or path to database file if using sqlite3. +DATABASE_ENGINE = 'postgresql_psycopg2' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. +DATABASE_NAME = 'helios' # Or path to database file if using sqlite3. DATABASE_USER = '' # Not used with sqlite3. DATABASE_PASSWORD = '' # Not used with sqlite3. DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3. @@ -37,7 +22,7 @@ DATABASE_PORT = '' # Set to empty string for default. Not used with # although not all choices may be available on all operating systems. # If running in a Windows environment this must be set to the same as your # system time zone. -TIME_ZONE = 'UTC' +TIME_ZONE = 'America/San_Francisco' # Language code for this installation. All choices can be found here: # http://www.i18nguy.com/unicode/language-identifiers.html @@ -64,12 +49,7 @@ MEDIA_URL = '' ADMIN_MEDIA_PREFIX = '/media/' # Make this unique, and don't share it with anybody. -SECRET_KEY = 'hvhxfm5u=^*v&doo#oq8x*eg8+1&9sxbye@=umutgn^t_sg_nx' - -# Ensure that email is not sent via SMTP by default to match the standard App -# Engine SDK behaviour. If you want to sent email via SMTP then add the name of -# your mailserver here. -EMAIL_HOST = '' +SECRET_KEY = 'lr-cxrs=hv*r6w2bsctmdm8(9y#yu^_epw$q#$($$uze8b*ctb' # List of callables that know how to import templates from various sources. TEMPLATE_LOADERS = ( @@ -81,16 +61,7 @@ TEMPLATE_LOADERS = ( MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', -# 'django.contrib.auth.middleware.AuthenticationMiddleware', -# 'django.middleware.doc.XViewMiddleware', -) - -TEMPLATE_CONTEXT_PROCESSORS = ( -# 'django.core.context_processors.auth', - 'django.core.context_processors.debug', - 'django.core.context_processors.i18n', -# 'django.core.context_processors.media', # 0.97 only. -# 'django.core.context_processors.request', + 'django.contrib.auth.middleware.AuthenticationMiddleware', ) ROOT_URLCONF = 'urls' @@ -101,54 +72,36 @@ TEMPLATE_DIRS = ( os.path.join(ROOT_PATH, 'templates') ) - -# Change your email settings -DEFAULT_FROM_EMAIL = 'Ben Adida for Helios <ben@adida.net>' -SERVER_EMAIL = DEFAULT_FROM_EMAIL - -# Make this unique, and don't share it with anybody. -SECRET_KEY = 'votingrulez!!!ohyeah,andheliostoo' - -LOGIN_URL = '/auth/' -#LOGOUT_URL = '/account/logout/' -#LOGIN_REDIRECT_URL = '/' - -LOGOUT_ON_CONFIRMATION = True - INSTALLED_APPS = ( - 'appengine_django', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.sites', 'auth', 'helios', 'server_ui', ) +## +## HELIOS +## -APPEND_SLASH = False -DEBUG = True -TEMPLATE_DEBUG = True -URL_HOST = "https://FILL-ME-IN-helios.appspot.com" +# Change your email settings +DEFAULT_FROM_EMAIL = 'Ben Adida for Helios <ben@adida.net>' +SERVER_EMAIL = DEFAULT_FROM_EMAIL + +LOGIN_URL = '/auth/' +LOGOUT_ON_CONFIRMATION = True + +URL_HOST = "http://localhost:8000" # election stuff SITE_TITLE = 'Helios Single Election Server' -SINGLE_ELECTION_TITLE = 'Helios Single Election' -SINGLE_ELECTION_UUID = 'FILL-ME-IN' -SINGLE_ELECTION_SHORT_NAME = 'FILL-ME-IN' -SINGLE_ELECTION_DESCRIPTION = 'FILL-ME-IN' - -SINGLE_ELECTION_PARAMS = { - 'short_name' : SINGLE_ELECTION_SHORT_NAME, - 'name' : SINGLE_ELECTION_TITLE, - 'description' : SINGLE_ELECTION_DESCRIPTION, - 'uuid' : SINGLE_ELECTION_UUID, - 'openreg': False, - 'tally_type': 'homomorphic', - 'ballot_type': 'homomorphic', - 'use_voter_aliases': True -} # FOOTER links FOOTER_LINKS = [{'url':'http://usg.princeton.edu/elections', 'text':'USG Elections Center'}] FOOTER_LOGO = False WELCOME_MESSAGE = "welcome" + -- GitLab