annotate gpp/settings.py @ 35:f77a1cdd7a46

Donations: first cut at a donations view and a form built for paypal.
author Brian Neal <bgneal@gmail.com>
date Sun, 07 Jun 2009 00:22:50 +0000
parents c018872385ea
children 296b610ee507
rev   line source
gremmie@1 1 # Django settings for gpp project.
gremmie@1 2
gremmie@1 3 import os
gremmie@1 4 import platform
gremmie@1 5 import local_settings
bgneal@35 6 from decimal import Decimal
bgneal@35 7
gremmie@1 8 project_path = os.path.abspath(os.path.split(__file__)[0])
gremmie@1 9
gremmie@1 10 DEBUG = local_settings.DEBUG
gremmie@1 11 TEMPLATE_DEBUG = DEBUG
gremmie@1 12
gremmie@1 13 ADMINS = (
gremmie@1 14 ('Brian Neal', 'admin@surfguitar101.com'),
gremmie@1 15 )
gremmie@1 16
gremmie@1 17 AUTH_PROFILE_MODULE = 'bio.userprofile'
gremmie@1 18
gremmie@1 19 MANAGERS = ADMINS
gremmie@1 20
gremmie@1 21 DATABASE_ENGINE = local_settings.DATABASE_ENGINE
gremmie@1 22 DATABASE_NAME = local_settings.DATABASE_NAME
gremmie@1 23 DATABASE_USER = local_settings.DATABASE_USER
gremmie@1 24 DATABASE_PASSWORD = local_settings.DATABASE_PASSWORD
gremmie@1 25 DATABASE_HOST = local_settings.DATABASE_HOST
gremmie@1 26 DATABASE_PORT = local_settings.DATABASE_PORT
gremmie@1 27
gremmie@1 28 INTERNAL_IPS = local_settings.INTERNAL_IPS
gremmie@1 29
gremmie@1 30 # Local time zone for this installation. Choices can be found here:
gremmie@1 31 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
gremmie@1 32 # although not all choices may be available on all operating systems.
gremmie@1 33 # If running in a Windows environment this must be set to the same as your
gremmie@1 34 # system time zone.
gremmie@1 35 TIME_ZONE = local_settings.TIME_ZONE
gremmie@1 36
gremmie@1 37 # Language code for this installation. All choices can be found here:
gremmie@1 38 # http://www.i18nguy.com/unicode/language-identifiers.html
gremmie@1 39 LANGUAGE_CODE = 'en-us'
gremmie@1 40
gremmie@1 41 SITE_ID = local_settings.SITE_ID
gremmie@1 42
gremmie@1 43 # If you set this to False, Django will make some optimizations so as not
gremmie@1 44 # to load the internationalization machinery.
gremmie@1 45 USE_I18N = False
gremmie@1 46
gremmie@1 47 # Absolute path to the directory that holds media.
gremmie@1 48 # Example: "/home/media/media.lawrence.com/"
gremmie@1 49 MEDIA_ROOT = local_settings.MEDIA_ROOT
gremmie@1 50
gremmie@1 51 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
gremmie@1 52 # trailing slash if there is a path component (optional in other cases).
gremmie@1 53 # Examples: "http://media.lawrence.com", "http://example.com/media/"
gremmie@1 54 MEDIA_URL = local_settings.MEDIA_URL
gremmie@1 55
gremmie@1 56 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
gremmie@1 57 # trailing slash.
gremmie@1 58 # Examples: "http://foo.com/media/", "/media/".
gremmie@1 59 ADMIN_MEDIA_PREFIX = local_settings.ADMIN_MEDIA_PREFIX
gremmie@1 60
gremmie@1 61 # Make this unique, and don't share it with anybody.
gremmie@1 62 SECRET_KEY = local_settings.SECRET_KEY
gremmie@1 63
gremmie@1 64 # List of callables that know how to import templates from various sources.
gremmie@1 65 TEMPLATE_LOADERS = (
gremmie@1 66 'django.template.loaders.filesystem.load_template_source',
gremmie@1 67 'django.template.loaders.app_directories.load_template_source',
gremmie@1 68 # 'django.template.loaders.eggs.load_template_source',
gremmie@1 69 )
gremmie@1 70
gremmie@1 71 MIDDLEWARE_CLASSES = (
gremmie@1 72 'django.middleware.common.CommonMiddleware',
gremmie@1 73 'django.contrib.sessions.middleware.SessionMiddleware',
gremmie@1 74 'django.contrib.auth.middleware.AuthenticationMiddleware',
gremmie@1 75 )
gremmie@1 76
gremmie@1 77 ROOT_URLCONF = 'gpp.urls'
gremmie@1 78
gremmie@1 79 TEMPLATE_DIRS = (
gremmie@1 80 # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
gremmie@1 81 # Always use forward slashes, even on Windows.
gremmie@1 82 # Don't forget to use absolute paths, not relative paths.
gremmie@1 83 os.path.join(project_path, 'templates'),
bgneal@29 84 '/home/brian/coding/python/django/django-elsewhere/elsewhere/templates',
gremmie@1 85 )
gremmie@1 86
gremmie@1 87 TEMPLATE_CONTEXT_PROCESSORS = (
gremmie@1 88 "django.core.context_processors.auth",
gremmie@1 89 "django.core.context_processors.debug",
gremmie@1 90 "django.core.context_processors.request",
gremmie@1 91 "django.core.context_processors.media"
gremmie@1 92 )
gremmie@1 93
gremmie@1 94 INSTALLED_APPS = (
gremmie@1 95 'django.contrib.admin',
gremmie@1 96 'django.contrib.admindocs',
gremmie@1 97 'django.contrib.auth',
gremmie@1 98 'django.contrib.contenttypes',
bgneal@28 99 'django.contrib.humanize',
gremmie@1 100 'django.contrib.sessions',
gremmie@1 101 'django.contrib.sites',
gremmie@1 102 'django.contrib.markup',
bgneal@29 103 'elsewhere',
gremmie@1 104 'tagging',
gremmie@1 105 'accounts',
gremmie@1 106 'bio',
gremmie@1 107 'bulletins',
gremmie@1 108 'comments',
gremmie@1 109 'contact',
gremmie@1 110 'core',
bgneal@33 111 'donations',
gremmie@1 112 'downloads',
gremmie@1 113 'gcalendar',
gremmie@1 114 'irc',
gremmie@1 115 'legal',
gremmie@1 116 'membermap',
gremmie@1 117 'messages',
gremmie@1 118 'news',
gremmie@1 119 'podcast',
gremmie@1 120 'polls',
gremmie@1 121 'potd',
gremmie@1 122 'shoutbox',
gremmie@1 123 'smiley',
gremmie@1 124 'weblinks',
gremmie@1 125 )
gremmie@1 126
gremmie@1 127 LOGIN_URL = '/accounts/login/'
gremmie@1 128 LOGIN_REDIRECT_URL = '/profile/me/'
gremmie@1 129 LOGOUT_URL = '/accounts/logout/'
gremmie@1 130
gremmie@1 131 FILE_UPLOAD_PERMISSIONS = 0640
gremmie@1 132
gremmie@1 133 #######################################################################
gremmie@1 134 # Tagging Specific Settings
gremmie@1 135 #######################################################################
gremmie@1 136 FORCE_LOWERCASE_TAGS = True
gremmie@1 137 MAX_TAG_LENGTH = 50
gremmie@1 138
gremmie@1 139 #######################################################################
gremmie@1 140 # GPP Specific Settings
gremmie@1 141 #######################################################################
gremmie@1 142 GPP_LOG_LEVEL = 0
gremmie@1 143 GPP_SEND_EMAIL = False
gremmie@1 144 GPP_NO_REPLY_EMAIL = 'no_reply'
gremmie@1 145 AVATAR_DIR = 'avatars'
gremmie@1 146 MAX_AVATAR_SIZE_BYTES = 2 * 1024 * 1024
gremmie@1 147 MAX_AVATAR_SIZE_PIXELS = 100
gremmie@1 148 AVATAR_DEFAULT_URL = MEDIA_URL + AVATAR_DIR + '/default.png'
bgneal@35 149 DONATIONS_ITEM_NAME = 'Donation for SurfGuitar101.com'
bgneal@35 150 DONATIONS_BUSINESS = 'brian@surfguitar101.com'
bgneal@35 151 DONATIONS_BUSINESS_DEBUG = 'brian@surfguitar101.com'
bgneal@35 152 DONATIONS_GOAL = Decimal('100.00') # montly goal
bgneal@35 153 DONATIONS_ANON_NAME = u'Anonymous'
bgneal@35 154 DONATIONS_ITEM_NUM = 500 # donation w/name listed
bgneal@35 155 DONATIONS_ITEM_ANON_NUM = 501 # donation listed as anonymous
bgneal@6 156
bgneal@6 157 # URL's of 3rd party Javascript and CSS files.
bgneal@6 158 # These dictionaries are used by core/templatetags/script_tags, and
bgneal@6 159 # should also be used by developers when creating form media classes.
bgneal@6 160 GPP_THIRD_PARTY_JS = {
bgneal@6 161 'jquery': (
bgneal@6 162 'http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js',
bgneal@6 163 ),
bgneal@6 164 'jquery-autocomplete': (
bgneal@6 165 'js/jquery-autocomplete/lib/jquery.bgiframe.min.js',
bgneal@6 166 'js/jquery-autocomplete/lib/jquery.ajaxQueue.js',
bgneal@6 167 'js/jquery-autocomplete/jquery.autocomplete.js',
bgneal@6 168 ),
bgneal@6 169 'jquery-jeditable': (
bgneal@6 170 'js/jquery.jeditable.mini.js',
bgneal@6 171 ),
bgneal@6 172 'jquery-ui': (
bgneal@11 173 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/jquery-ui.min.js',
bgneal@6 174 ),
bgneal@6 175 'markitup': (
bgneal@6 176 'js/markitup/jquery.markitup.pack.js',
bgneal@6 177 'js/markitup/sets/markdown/set.js',
bgneal@6 178 ),
bgneal@7 179 'tiny_mce': (
bgneal@7 180 'js/tiny_mce/tiny_mce.js',
bgneal@7 181 'js/tiny_mce_init_std.js',
bgneal@7 182 ),
bgneal@6 183 }
bgneal@6 184 GPP_THIRD_PARTY_CSS = {
bgneal@6 185 'jquery-ui': (
bgneal@11 186 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/redmond/jquery-ui.css',
bgneal@6 187 ),
bgneal@6 188 'jquery-autocomplete': (
bgneal@6 189 'js/jquery-autocomplete/jquery.autocomplete.css',
bgneal@6 190 ),
bgneal@6 191 'markitup': (
bgneal@6 192 'js/markitup/skins/markitup/style.css',
bgneal@6 193 'js/markitup/sets/markdown/style.css',
bgneal@6 194 ),
bgneal@6 195 }
bgneal@6 196