-# encoding:utf-8\r
-import os.path\r
-from django.utils.translation import ugettext as _\r
-\r
-def check_local_setting(name, value):\r
- local_vars = locals()\r
- if name in local_vars and local_vars[name] == value:\r
- return True\r
- else:\r
- return False\r
-\r
-SITE_SRC_ROOT = os.path.dirname(__file__)\r
-LOG_FILENAME = 'django.osqa.log'\r
-\r
-#for logging\r
-import logging\r
-logging.basicConfig(\r
- filename=os.path.join(SITE_SRC_ROOT, 'log', LOG_FILENAME),\r
- level=logging.DEBUG,\r
- format='%(pathname)s TIME: %(asctime)s MSG: %(filename)s:%(funcName)s:%(lineno)d %(message)s',\r
-)\r
-\r
-#ADMINS and MANAGERS\r
-ADMINS = (('Forum Admin', 'forum@example.com'),)\r
-MANAGERS = ADMINS\r
-\r
-#DEBUG SETTINGS\r
-DEBUG = False\r
-TEMPLATE_DEBUG = DEBUG\r
-INTERNAL_IPS = ('127.0.0.1',)\r
-\r
-DATABASE_NAME = '' # Or path to database file if using sqlite3.\r
-DATABASE_USER = '' # Not used with sqlite3.\r
-DATABASE_PASSWORD = '' # Not used with sqlite3.\r
-DATABASE_ENGINE = '' #mysql, etc\r
-DATABASE_HOST = ''\r
-DATABASE_PORT = ''\r
-\r
-#Moved from settings.py for better organization. (please check it up to clean up settings.py)\r
-\r
-#email server settings\r
-SERVER_EMAIL = ''\r
-DEFAULT_FROM_EMAIL = ''\r
-EMAIL_HOST_USER = ''\r
-EMAIL_HOST_PASSWORD = ''\r
-EMAIL_SUBJECT_PREFIX = '[OSQA] '\r
-EMAIL_HOST='osqa.net'\r
-EMAIL_PORT='25'\r
-EMAIL_USE_TLS=False\r
-\r
-#LOCALIZATIONS\r
-TIME_ZONE = 'America/New_York'\r
-\r
-###########################\r
-#\r
-# this will allow running your forum with url like http://site.com/forum\r
-#\r
-# FORUM_SCRIPT_ALIAS = 'forum/'\r
-#\r
-FORUM_SCRIPT_ALIAS = '' #no leading slash, default = '' empty string\r
-\r
-\r
-#OTHER SETTINGS\r
-APP_TITLE = u'OSQA: Open Source Q&A Forum'\r
-APP_SHORT_NAME = u'OSQA'\r
-APP_KEYWORDS = u'OSQA,CNPROG,forum,community'\r
-APP_DESCRIPTION = u'Ask and answer questions.'\r
-APP_INTRO = u'<p>Ask and answer questions, make the world better!</p>'\r
-APP_COPYRIGHT = 'Copyright OSQA, 2009. Some rights reserved under creative commons license.'\r
-LOGIN_URL = '/%s%s%s' % (FORUM_SCRIPT_ALIAS,'account/','signin/')\r
-GREETING_URL = LOGIN_URL #may be url of "faq" page or "about", etc\r
-\r
-USE_I18N = True\r
-LANGUAGE_CODE = 'en'\r
-EMAIL_VALIDATION = 'off' #string - on|off\r
-MIN_USERNAME_LENGTH = 1\r
-EMAIL_UNIQUE = False\r
-APP_URL = 'http://osqa.net' #used by email notif system and RSS\r
-GOOGLE_SITEMAP_CODE = ''\r
-GOOGLE_ANALYTICS_KEY = ''\r
-BOOKS_ON = False\r
-WIKI_ON = True\r
-USE_EXTERNAL_LEGACY_LOGIN = False\r
-EXTERNAL_LEGACY_LOGIN_HOST = 'login.osqa.net'\r
-EXTERNAL_LEGACY_LOGIN_PORT = 80\r
-EXTERNAL_LEGACY_LOGIN_PROVIDER_NAME = '<span class="orange">OSQA</span>'\r
-FEEDBACK_SITE_URL = None #None or url\r
-EDITABLE_SCREEN_NAME = False #True or False - can user change screen name?\r
-\r
-DJANGO_VERSION = 1.1\r
-RESOURCE_REVISION=4\r
-\r
-USE_SPHINX_SEARCH = False #if True all SPHINX_* settings are required\r
-#also sphinx search engine and djangosphinxs app must be installed\r
-#sample sphinx configuration file is /sphinx/sphinx.conf\r
-SPHINX_API_VERSION = 0x113 #refer to djangosphinx documentation\r
-SPHINX_SEARCH_INDICES=('osqa',) #a tuple of index names remember about a comma after the\r
-#last item, especially if you have just one :)\r
-SPHINX_SERVER='localhost'\r
-SPHINX_PORT=3312\r
-\r
-#please get these at recaptcha.net\r
-RECAPTCHA_PRIVATE_KEY='...'\r
-RECAPTCHA_PUBLIC_KEY='...'\r
-OSQA_DEFAULT_SKIN = 'default'\r
-\r
-#Facebook settings\r
-USE_FB_CONNECT=False\r
-FB_API_KEY='' #your api key from facebook\r
-FB_SECRET='' #your application secret\r
+# encoding:utf-8
+import os.path
+
+SITE_SRC_ROOT = os.path.dirname(__file__)
+LOG_FILENAME = 'django.osqa.log'
+
+#for logging
+import logging
+logging.basicConfig(
+ filename=os.path.join(SITE_SRC_ROOT, 'log', LOG_FILENAME),
+ level=logging.ERROR,
+ format='%(pathname)s TIME: %(asctime)s MSG: %(filename)s:%(funcName)s:%(lineno)d %(message)s',
+)
+
+#ADMINS and MANAGERS
+ADMINS = (('Forum Admin', 'forum@example.com'),)
+MANAGERS = ADMINS
+
+DEBUG = False
+DEBUG_TOOLBAR_CONFIG = {
+ 'INTERCEPT_REDIRECTS': True
+}
+TEMPLATE_DEBUG = DEBUG
+INTERNAL_IPS = ('127.0.0.1',)
+
+DATABASE_NAME = '' # Or path to database file if using sqlite3.
+DATABASE_USER = '' # Not used with sqlite3.
+DATABASE_PASSWORD = '' # Not used with sqlite3.
+DATABASE_ENGINE = '' #mysql, etc
+DATABASE_HOST = ''
+DATABASE_PORT = ''
+
+CACHE_BACKEND = 'file://%s' % os.path.join(os.path.dirname(__file__),'cache').replace('\\','/')
+#CACHE_BACKEND = 'dummy://'
+SESSION_ENGINE = 'django.contrib.sessions.backends.db'
+
+APP_URL = 'http://' #used by email notif system and RSS
+
+#LOCALIZATIONS
+TIME_ZONE = 'America/New_York'
+
+###########################
+#
+# this will allow running your forum with url like http://site.com/forum
+#
+# FORUM_SCRIPT_ALIAS = 'forum/'
+#
+FORUM_SCRIPT_ALIAS = '' #no leading slash, default = '' empty string
+
+
+#OTHER SETTINGS
+
+USE_I18N = True
+LANGUAGE_CODE = 'en'
+
+EMAIL_VALIDATION = 'off' #string - on|off
+
+DJANGO_VERSION = 1.1
+OSQA_DEFAULT_SKIN = 'default'
+
+DISABLED_MODULES = ['books', 'recaptcha', 'project_badges']