3 from django.utils.translation import ugettext as _
\r
5 def check_local_setting(name, value):
\r
6 local_vars = locals()
\r
7 if name in local_vars and local_vars[name] == value:
\r
12 SITE_SRC_ROOT = os.path.dirname(__file__)
\r
13 LOG_FILENAME = 'django.osqa.log'
\r
17 logging.basicConfig(
\r
18 filename=os.path.join(SITE_SRC_ROOT, 'log', LOG_FILENAME),
\r
19 level=logging.DEBUG,
\r
20 format='%(pathname)s TIME: %(asctime)s MSG: %(filename)s:%(funcName)s:%(lineno)d %(message)s',
\r
23 #ADMINS and MANAGERS
\r
24 ADMINS = (('Forum Admin', 'forum@example.com'),)
\r
29 TEMPLATE_DEBUG = DEBUG
\r
30 INTERNAL_IPS = ('127.0.0.1',)
\r
32 DATABASE_NAME = '' # Or path to database file if using sqlite3.
\r
33 DATABASE_USER = '' # Not used with sqlite3.
\r
34 DATABASE_PASSWORD = '' # Not used with sqlite3.
\r
35 DATABASE_ENGINE = '' #mysql, etc
\r
39 #Moved from settings.py for better organization. (please check it up to clean up settings.py)
\r
41 #email server settings
\r
43 DEFAULT_FROM_EMAIL = ''
\r
44 EMAIL_HOST_USER = ''
\r
45 EMAIL_HOST_PASSWORD = ''
\r
46 EMAIL_SUBJECT_PREFIX = '[OSQA] '
\r
47 EMAIL_HOST='osqa.net'
\r
52 TIME_ZONE = 'America/New_York'
\r
54 ###########################
\r
56 # this will allow running your forum with url like http://site.com/forum
\r
58 # FORUM_SCRIPT_ALIAS = 'forum/'
\r
60 FORUM_SCRIPT_ALIAS = '' #no leading slash, default = '' empty string
\r
64 APP_TITLE = u'OSQA: Open Source Q&A Forum'
\r
65 APP_SHORT_NAME = u'OSQA'
\r
66 APP_KEYWORDS = u'OSQA,CNPROG,forum,community'
\r
67 APP_DESCRIPTION = u'Ask and answer questions.'
\r
68 APP_INTRO = u'<p>Ask and answer questions, make the world better!</p>'
\r
69 APP_COPYRIGHT = 'Copyright OSQA, 2009. Some rights reserved under creative commons license.'
\r
70 LOGIN_URL = '/%s%s%s' % (FORUM_SCRIPT_ALIAS,'account/','signin/')
\r
71 GREETING_URL = LOGIN_URL #may be url of "faq" page or "about", etc
\r
74 LANGUAGE_CODE = 'en'
\r
75 EMAIL_VALIDATION = 'off' #string - on|off
\r
76 MIN_USERNAME_LENGTH = 1
\r
77 EMAIL_UNIQUE = False
\r
78 APP_URL = 'http://osqa.net' #used by email notif system and RSS
\r
79 GOOGLE_SITEMAP_CODE = ''
\r
80 GOOGLE_ANALYTICS_KEY = ''
\r
83 USE_EXTERNAL_LEGACY_LOGIN = False
\r
84 EXTERNAL_LEGACY_LOGIN_HOST = 'login.osqa.net'
\r
85 EXTERNAL_LEGACY_LOGIN_PORT = 80
\r
86 EXTERNAL_LEGACY_LOGIN_PROVIDER_NAME = '<span class="orange">OSQA</span>'
\r
87 FEEDBACK_SITE_URL = None #None or url
\r
88 EDITABLE_SCREEN_NAME = False #True or False - can user change screen name?
\r
90 DJANGO_VERSION = 1.1
\r
93 USE_SPHINX_SEARCH = False #if True all SPHINX_* settings are required
\r
94 #also sphinx search engine and djangosphinxs app must be installed
\r
95 #sample sphinx configuration file is /sphinx/sphinx.conf
\r
96 SPHINX_API_VERSION = 0x113 #refer to djangosphinx documentation
\r
97 SPHINX_SEARCH_INDICES=('osqa',) #a tuple of index names remember about a comma after the
\r
98 #last item, especially if you have just one :)
\r
99 SPHINX_SERVER='localhost'
\r
102 #please get these at recaptcha.net
\r
103 RECAPTCHA_PRIVATE_KEY='...'
\r
104 RECAPTCHA_PUBLIC_KEY='...'
\r
105 OSQA_DEFAULT_SKIN = 'default'
\r
108 USE_FB_CONNECT=False
\r
109 FB_API_KEY='' #your api key from facebook
\r
110 FB_SECRET='' #your application secret
\r