/settings.py
Python | 159 lines | 132 code | 12 blank | 15 comment | 2 complexity | 93b2ba52099a12b7417c5d9379c4bde0 MD5 | raw file
1# Django settings for forumapp project. 2import os.path 3 4DEBUG = True 5TEMPLATE_DEBUG = DEBUG 6 7ADMINS = ( 8 # ('Your Name', 'your_email@example.com'), 9) 10 11MANAGERS = ADMINS 12 13DATABASES = { 14 'default': { 15 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 16 'NAME': 'forumappdemo', # Or path to database file if using sqlite3. 17 'USER': '', # Not used with sqlite3. 18 'PASSWORD': '', # Not used with sqlite3. 19 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. 20 'PORT': '', # Set to empty string for default. Not used with sqlite3. 21 } 22} 23 24# Domain URL used for creating full links in forum admin emails 25SITE_DOMAIN = 'http://localhost:8080' 26 27NOTIFY_ADMINS = False # if true add topic/post will send a email to admin 28FORUM_MAX_ANONYMOUS_POSTS_PER_HOUR = 10 # how many posts may be made by anonymous within an hour from now 29FORUM_MAX_USER_POST_PER_HOUR = 10 # how many posts may be made by every logged in user within an hour from now. 0 - no limit 30FORUM_USE_RECAPTCHA = False # if true will show recaptha for users with < 5 posts 31 32RECAPTCHA_PUBLIC_KEY = '' 33RECAPTCHA_PRIVATE_KEY = '' 34 35LOGIN_URL = '/user/login/' 36LOGIN_REDIRECT_URL = '/' 37AUTH_PROFILE_MODULE = 'userpanel.profile' 38# Local time zone for this installation. Choices can be found here: 39# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name 40# although not all choices may be available on all operating systems. 41# On Unix systems, a value of None will cause Django to use the same 42# timezone as the operating system. 43# If running in a Windows environment this must be set to the same as your 44# system time zone. 45TIME_ZONE = 'America/Chicago' 46 47# Language code for this installation. All choices can be found here: 48# http://www.i18nguy.com/unicode/language-identifiers.html 49LANGUAGE_CODE = 'en-us' 50 51SITE_ID = 1 52 53# If you set this to False, Django will make some optimizations so as not 54# to load the internationalization machinery. 55USE_I18N = True 56 57# If you set this to False, Django will not format dates, numbers and 58# calendars according to the current locale 59USE_L10N = True 60 61# Absolute filesystem path to the directory that will hold user-uploaded files. 62# Example: "/home/media/media.lawrence.com/media/" 63MEDIA_ROOT = os.path.join(os.path.dirname(__file__), 'site_media') 64 65# URL that handles the media served from MEDIA_ROOT. Make sure to use a 66# trailing slash. 67# Examples: "http://media.lawrence.com/media/", "http://example.com/media/" 68MEDIA_URL = '' 69 70# Absolute path to the directory static files should be collected to. 71# Don't put anything in this directory yourself; store your static files 72# in apps' "static/" subdirectories and in STATICFILES_DIRS. 73# Example: "/home/media/media.lawrence.com/static/" 74STATIC_ROOT = '' 75 76# URL prefix for static files. 77# Example: "http://media.lawrence.com/static/" 78STATIC_URL = '/static/' 79 80# URL prefix for admin static files -- CSS, JavaScript and images. 81# Make sure to use a trailing slash. 82# Examples: "http://foo.com/static/admin/", "/static/admin/". 83ADMIN_MEDIA_PREFIX = '/static/admin/' 84 85# Additional locations of static files 86STATICFILES_DIRS = ( 87 # Put strings here, like "/home/html/static" or "C:/www/django/static". 88 # Always use forward slashes, even on Windows. 89 # Don't forget to use absolute paths, not relative paths. 90) 91 92# List of finder classes that know how to find static files in 93# various locations. 94STATICFILES_FINDERS = ( 95 'django.contrib.staticfiles.finders.FileSystemFinder', 96 'django.contrib.staticfiles.finders.AppDirectoriesFinder', 97# 'django.contrib.staticfiles.finders.DefaultStorageFinder', 98) 99 100# Make this unique, and don't share it with anybody. 101SECRET_KEY = 'jkmes^j1iim))y5uj=(okj4qcf_50+a#^!870z)04%e55%o4cr' 102 103# List of callables that know how to import templates from various sources. 104TEMPLATE_LOADERS = ( 105 'django.template.loaders.filesystem.Loader', 106 'django.template.loaders.app_directories.Loader', 107# 'django.template.loaders.eggs.Loader', 108) 109 110MIDDLEWARE_CLASSES = ( 111 'django.middleware.common.CommonMiddleware', 112 'django.contrib.sessions.middleware.SessionMiddleware', 113 'django.middleware.csrf.CsrfViewMiddleware', 114 'django.contrib.auth.middleware.AuthenticationMiddleware', 115 'django.contrib.messages.middleware.MessageMiddleware', 116 'diamandas.userpanel.userMiddleware.userMiddleware', 117) 118 119ROOT_URLCONF = 'urls' 120 121TEMPLATE_DIRS = ( 122 'diamandas/myghtyboard/templates' 123) 124 125INSTALLED_APPS = ( 126 'django.contrib.auth', 127 'django.contrib.contenttypes', 128 'django.contrib.sessions', 129 'django.contrib.sites', 130 'django.contrib.messages', 131 'django.contrib.staticfiles', 132 'diamandas.recaptchawidget', 133 'diamandas.myghtyboard', 134 'diamandas.userpanel', 135 'django.contrib.admin', 136) 137 138# A sample logging configuration. The only tangible logging 139# performed by this configuration is to send an email to 140# the site admins on every HTTP 500 error. 141# See http://docs.djangoproject.com/en/dev/topics/logging for 142# more details on how to customize your logging configuration. 143LOGGING = { 144 'version': 1, 145 'disable_existing_loggers': False, 146 'handlers': { 147 'mail_admins': { 148 'level': 'ERROR', 149 'class': 'django.utils.log.AdminEmailHandler' 150 } 151 }, 152 'loggers': { 153 'django.request': { 154 'handlers': ['mail_admins'], 155 'level': 'ERROR', 156 'propagate': True, 157 }, 158 } 159}