From faf167aed99ac4e28927f729b7c7bc94a47ef139 Mon Sep 17 00:00:00 2001 From: Evgeny Fadeev Date: Sun, 26 Jul 2009 22:33:56 -0400 Subject: merged in latest Mikes changes --- settings_local.py.dist | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 settings_local.py.dist (limited to 'settings_local.py.dist') diff --git a/settings_local.py.dist b/settings_local.py.dist new file mode 100644 index 00000000..2c8f939d --- /dev/null +++ b/settings_local.py.dist @@ -0,0 +1,25 @@ +SITE_SRC_ROOT = '/Users/sailing/Development/cnprog_beta2' + +#for logging +import logging +LOG_FILENAME = '/Users/sailing/Development/cnprog_beta2/django.lanai.log' +logging.basicConfig(filename=LOG_FILENAME,level=logging.DEBUG,) + + +#Database configuration +DATABASE_ENGINE = 'mysql' +DATABASE_HOST = '' +DATABASE_PORT = '' +DATABASE_NAME = 'cnprog' # Or path to database file if using sqlite3. +DATABASE_USER = 'root' # Not used with sqlite3. +DATABASE_PASSWORD = '' # Not used with sqlite3. + + +# Absolute path to the directory that holds media. +# Example: "/home/media/media.lawrence.com/" +MEDIA_ROOT = '/Users/sailing/Development/cnprog_beta2/templates/upfiles/' + +# URL that handles the media served from MEDIA_ROOT. Make sure to use a +# trailing slash if there is a path component (optional in other cases). +# Examples: "http://media.lawrence.com", "http://example.com/media/" +MEDIA_URL = 'http://127.0.0.1:8000/upfiles/' -- cgit v1.2.3-1-g7c22 From 725dbd5794ba7e19c218ca2cd1f2e798255acdf0 Mon Sep 17 00:00:00 2001 From: Adolfo Fitoria Date: Sun, 9 Aug 2009 21:34:41 -0600 Subject: modified settings.py and settings_local.py.dist to be more organized --- settings_local.py.dist | 56 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 39 insertions(+), 17 deletions(-) (limited to 'settings_local.py.dist') diff --git a/settings_local.py.dist b/settings_local.py.dist index 2c8f939d..d6273070 100644 --- a/settings_local.py.dist +++ b/settings_local.py.dist @@ -1,25 +1,47 @@ -SITE_SRC_ROOT = '/Users/sailing/Development/cnprog_beta2' +# encoding:utf-8 +import os.path + +SITE_SRC_ROOT = os.path.dirname(__file__) +LOG_FILENAME = 'django.lanai.log' #for logging import logging -LOG_FILENAME = '/Users/sailing/Development/cnprog_beta2/django.lanai.log' -logging.basicConfig(filename=LOG_FILENAME,level=logging.DEBUG,) - +logging.basicConfig(filename=os.path.join(SITE_SRC_ROOT, 'log', LOG_FILENAME), level=logging.DEBUG,) -#Database configuration -DATABASE_ENGINE = 'mysql' -DATABASE_HOST = '' -DATABASE_PORT = '' -DATABASE_NAME = 'cnprog' # Or path to database file if using sqlite3. -DATABASE_USER = 'root' # Not used with sqlite3. +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 + +#Moved from settings.py for better organization. (please check it up to clean up settings.py) + +#email server settings +SERVER_EMAIL = '' +DEFAULT_FROM_EMAIL = 'team@cnprog.com' +EMAIL_HOST_USER = '' +EMAIL_HOST_PASSWORD = '' +EMAIL_SUBJECT_PREFIX = '[cnprog.com]' +EMAIL_HOST='smtp.gmail.com' +EMAIL_PORT='587' +EMAIL_USE_TLS=True + +#LOCALIZATIONS +TIME_ZONE = 'Asia/Chongqing Asia/Chungking' +# LANGUAGE_CODE = 'en-us' +#OTHER SETTINGS +APP_TITLE = u'CNProg.com 程序员问答社区' +APP_KEYWORDS = u'技术问答社区,中国程序员,编程技术社区,程序员社区,程序员论坛,程序员wiki,程序员博客' +APP_DESCRIPTION = u'中国程序员的编程技术问答社区。我们做专业的、可协作编辑的技术问答社区。' +APP_INTRO = u'

CNProg是一个面向程序员的可协作编辑的开放源代码问答社区

您可以在这里提问各类程序技术问题 - 问题不分语言和平台。 同时也希望您对力所能及的问题,给予您的宝贵答案。

' +APP_COPYRIGHT = 'Copyright CNPROG.COM 2009' -# Absolute path to the directory that holds media. -# Example: "/home/media/media.lawrence.com/" -MEDIA_ROOT = '/Users/sailing/Development/cnprog_beta2/templates/upfiles/' +USE_I18N = True +LANGUAGE_CODE = 'en' +EMAIL_VALIDATION = 'off' +MIN_USERNAME_LENGTH = 1 +EMAIL_UNIQUE = False +APP_URL = 'http://server.com' #used by email notif system and RSS +GOOGLE_SITEMAP_CODE = '55uGNnQVJW8p1bbXeF/Xbh9I7nZBM/wLhRz6N/I1kkA=' +GOOGLE_ANALYTICS_KEY = '' -# URL that handles the media served from MEDIA_ROOT. Make sure to use a -# trailing slash if there is a path component (optional in other cases). -# Examples: "http://media.lawrence.com", "http://example.com/media/" -MEDIA_URL = 'http://127.0.0.1:8000/upfiles/' -- cgit v1.2.3-1-g7c22 From 5c6fceae98c0916c94ec5b919950c67475f44b67 Mon Sep 17 00:00:00 2001 From: Evgeny Fadeev Date: Wed, 12 Aug 2009 15:26:56 -0400 Subject: merged Bruno url translations, removed his local mods, added settings.BOOKS_ON, validated more templates --- settings_local.py.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'settings_local.py.dist') diff --git a/settings_local.py.dist b/settings_local.py.dist index d6273070..48d7b567 100644 --- a/settings_local.py.dist +++ b/settings_local.py.dist @@ -44,4 +44,4 @@ EMAIL_UNIQUE = False APP_URL = 'http://server.com' #used by email notif system and RSS GOOGLE_SITEMAP_CODE = '55uGNnQVJW8p1bbXeF/Xbh9I7nZBM/wLhRz6N/I1kkA=' GOOGLE_ANALYTICS_KEY = '' - +BOOKS_ON = True -- cgit v1.2.3-1-g7c22 From 7e4f1d542e00b4d3121da6ae5524e95867f2371b Mon Sep 17 00:00:00 2001 From: root Date: Fri, 13 Nov 2009 20:18:55 -0500 Subject: better comments, email subscriptions, corrected view counter, some ie7 issues, wiki optional with settings.WIKI_ON, site can be mounted on arbitrary url prefix, english language improvements, added feedback form, versioned css and js files to force browser cache reload when settings.RESOURCE_REVISION is incremented , other fixes --- settings_local.py.dist | 55 ++++++++++++++++++++++++++++++++++---------------- 1 file changed, 38 insertions(+), 17 deletions(-) (limited to 'settings_local.py.dist') diff --git a/settings_local.py.dist b/settings_local.py.dist index 48d7b567..e43522ef 100644 --- a/settings_local.py.dist +++ b/settings_local.py.dist @@ -1,5 +1,6 @@ # encoding:utf-8 import os.path +from django.utils.translation import ugettext as _ SITE_SRC_ROOT = os.path.dirname(__file__) LOG_FILENAME = 'django.lanai.log' @@ -8,40 +9,60 @@ LOG_FILENAME = 'django.lanai.log' import logging logging.basicConfig(filename=os.path.join(SITE_SRC_ROOT, 'log', LOG_FILENAME), level=logging.DEBUG,) -DATABASE_NAME = '' # Or path to database file if using sqlite3. +DATABASE_NAME = 'cnprog' # 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_ENGINE = 'mysql' #mysql, etc #Moved from settings.py for better organization. (please check it up to clean up settings.py) #email server settings SERVER_EMAIL = '' -DEFAULT_FROM_EMAIL = 'team@cnprog.com' +DEFAULT_FROM_EMAIL = '' EMAIL_HOST_USER = '' EMAIL_HOST_PASSWORD = '' -EMAIL_SUBJECT_PREFIX = '[cnprog.com]' -EMAIL_HOST='smtp.gmail.com' -EMAIL_PORT='587' -EMAIL_USE_TLS=True +EMAIL_SUBJECT_PREFIX = '[CNPROG] ' +EMAIL_HOST='cnprog.com' +EMAIL_PORT='25' +EMAIL_USE_TLS=False #LOCALIZATIONS -TIME_ZONE = 'Asia/Chongqing Asia/Chungking' -# LANGUAGE_CODE = 'en-us' +TIME_ZONE = 'America/Tijuana' #OTHER SETTINGS -APP_TITLE = u'CNProg.com 程序员问答社区' -APP_KEYWORDS = u'技术问答社区,中国程序员,编程技术社区,程序员社区,程序员论坛,程序员wiki,程序员博客' -APP_DESCRIPTION = u'中国程序员的编程技术问答社区。我们做专业的、可协作编辑的技术问答社区。' -APP_INTRO = u'

CNProg是一个面向程序员的可协作编辑的开放源代码问答社区

您可以在这里提问各类程序技术问题 - 问题不分语言和平台。 同时也希望您对力所能及的问题,给予您的宝贵答案。

' -APP_COPYRIGHT = 'Copyright CNPROG.COM 2009' +APP_TITLE = u'CNPROG Q&A Forum' +APP_KEYWORDS = u'CNPROG,forum,community' +APP_DESCRIPTION = u'Ask and answer questions.' +APP_INTRO = u'

Ask and answer questions, make the world better!

' +APP_COPYRIGHT = 'Copyright CNPROG, 2009. Some rights reserved under creative commons license.' + +########################### +# +# this will allow running your forum with url like http://site.com/forum +# +# FORUM_SCRIPT_ALIAS = 'forum/' +# +# also make sure to set '/':'/forum' in file templates/content/js/com.cnprog.i18n.js +# this is necessary to make client scripts work in this configuration +# +FORUM_SCRIPT_ALIAS = '' #no leading slash, default = '' empty string USE_I18N = True LANGUAGE_CODE = 'en' -EMAIL_VALIDATION = 'off' +EMAIL_VALIDATION = 'off' #string - on|off MIN_USERNAME_LENGTH = 1 EMAIL_UNIQUE = False -APP_URL = 'http://server.com' #used by email notif system and RSS +APP_URL = 'http://cnprog.com' #used by email notif system and RSS GOOGLE_SITEMAP_CODE = '55uGNnQVJW8p1bbXeF/Xbh9I7nZBM/wLhRz6N/I1kkA=' GOOGLE_ANALYTICS_KEY = '' -BOOKS_ON = True +BOOKS_ON = False +WIKI_ON = True +USE_EXTERNAL_LEGACY_LOGIN = True +EXTERNAL_LEGACY_LOGIN_HOST = 'login.cnprog.com' +EXTERNAL_LEGACY_LOGIN_PORT = 80 +EXTERNAL_LEGACY_LOGIN_PROVIDER_NAME = 'CNPROG' +FEEDBACK_SITE_URL = None #None or url +LOGIN_URL = '/%s%s%s' % (FORUM_SCRIPT_ALIAS,'account/','signin/') + +DJANGO_VERSION = 1.1 +RESOURCE_REVISION=4 -- cgit v1.2.3-1-g7c22 From 56bc6d41fa35c8fb06eff8270a986ff5d3f3dc7c Mon Sep 17 00:00:00 2001 From: Evgeny Fadeev Date: Tue, 17 Nov 2009 12:25:10 -0500 Subject: turned off by default legacy password login through external website --- settings_local.py.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'settings_local.py.dist') diff --git a/settings_local.py.dist b/settings_local.py.dist index e43522ef..685c9fb8 100644 --- a/settings_local.py.dist +++ b/settings_local.py.dist @@ -57,7 +57,7 @@ GOOGLE_SITEMAP_CODE = '55uGNnQVJW8p1bbXeF/Xbh9I7nZBM/wLhRz6N/I1kkA=' GOOGLE_ANALYTICS_KEY = '' BOOKS_ON = False WIKI_ON = True -USE_EXTERNAL_LEGACY_LOGIN = True +USE_EXTERNAL_LEGACY_LOGIN = False EXTERNAL_LEGACY_LOGIN_HOST = 'login.cnprog.com' EXTERNAL_LEGACY_LOGIN_PORT = 80 EXTERNAL_LEGACY_LOGIN_PROVIDER_NAME = 'CNPROG' -- cgit v1.2.3-1-g7c22 From 46e48e400f30bde76a9b21db78f9b727149a3e24 Mon Sep 17 00:00:00 2001 From: Evgeny Fadeev Date: Tue, 17 Nov 2009 22:14:15 -0500 Subject: full text search with Sphinx, added session-based greeting message for the first time visitor --- settings_local.py.dist | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) (limited to 'settings_local.py.dist') diff --git a/settings_local.py.dist b/settings_local.py.dist index 685c9fb8..33402d35 100644 --- a/settings_local.py.dist +++ b/settings_local.py.dist @@ -29,13 +29,6 @@ EMAIL_USE_TLS=False #LOCALIZATIONS TIME_ZONE = 'America/Tijuana' -#OTHER SETTINGS -APP_TITLE = u'CNPROG Q&A Forum' -APP_KEYWORDS = u'CNPROG,forum,community' -APP_DESCRIPTION = u'Ask and answer questions.' -APP_INTRO = u'

Ask and answer questions, make the world better!

' -APP_COPYRIGHT = 'Copyright CNPROG, 2009. Some rights reserved under creative commons license.' - ########################### # # this will allow running your forum with url like http://site.com/forum @@ -47,6 +40,16 @@ APP_COPYRIGHT = 'Copyright CNPROG, 2009. Some rights reserved under creative com # FORUM_SCRIPT_ALIAS = '' #no leading slash, default = '' empty string + +#OTHER SETTINGS +APP_TITLE = u'CNPROG Q&A Forum' +APP_KEYWORDS = u'CNPROG,forum,community' +APP_DESCRIPTION = u'Ask and answer questions.' +APP_INTRO = u'

Ask and answer questions, make the world better!

' +APP_COPYRIGHT = 'Copyright CNPROG, 2009. Some rights reserved under creative commons license.' +LOGIN_URL = '/%s%s%s' % (FORUM_SCRIPT_ALIAS,'account/','signin/') +GREETING_URL = LOGIN_URL #may be url of "faq" page or "about", etc + USE_I18N = True LANGUAGE_CODE = 'en' EMAIL_VALIDATION = 'off' #string - on|off @@ -62,7 +65,15 @@ EXTERNAL_LEGACY_LOGIN_HOST = 'login.cnprog.com' EXTERNAL_LEGACY_LOGIN_PORT = 80 EXTERNAL_LEGACY_LOGIN_PROVIDER_NAME = 'CNPROG' FEEDBACK_SITE_URL = None #None or url -LOGIN_URL = '/%s%s%s' % (FORUM_SCRIPT_ALIAS,'account/','signin/') DJANGO_VERSION = 1.1 RESOURCE_REVISION=4 + +USE_SPHINX_SEARCH = True #if True all SPHINX_* settings are required +#also sphinx search engine and djangosphinxs app must be installed +#sample sphinx configuration file is /sphinx/sphinx.conf +SPHINX_API_VERSION = 0x113 #refer to djangosphinx documentation +SPHINX_SEARCH_INDICES=('cnprog',) #a tuple of index names remember about a comma after the +#last item, especially if you have just one :) +SPHINX_SERVER='localhost' +SPHINX_PORT=3312 -- cgit v1.2.3-1-g7c22 From bf3a507acbc253f436ffc51e2cf8b42b707c617b Mon Sep 17 00:00:00 2001 From: root Date: Wed, 25 Nov 2009 17:15:08 -0500 Subject: fixed error in template and removed ADMINS and DEBUG settings from settings.py --- settings_local.py.dist | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'settings_local.py.dist') diff --git a/settings_local.py.dist b/settings_local.py.dist index 33402d35..8209a9fe 100644 --- a/settings_local.py.dist +++ b/settings_local.py.dist @@ -9,6 +9,15 @@ LOG_FILENAME = 'django.lanai.log' import logging logging.basicConfig(filename=os.path.join(SITE_SRC_ROOT, 'log', LOG_FILENAME), level=logging.DEBUG,) +#ADMINS and MANAGERS +ADMINS = (('Forum Admin', 'team@cnprog.com'),) +MANAGERS = ADMINS + +#DEBUG SETTINGS +DEBUG = False +TEMPLATE_DEBUG = DEBUG +INTERNAL_IPS = ('127.0.0.1',) + DATABASE_NAME = 'cnprog' # Or path to database file if using sqlite3. DATABASE_USER = '' # Not used with sqlite3. DATABASE_PASSWORD = '' # Not used with sqlite3. -- cgit v1.2.3-1-g7c22 From ad98bb5c3f6408ac9a12d1c79448ca841fbcd904 Mon Sep 17 00:00:00 2001 From: Evgeny Fadeev Date: Wed, 25 Nov 2009 17:18:54 -0500 Subject: added generic email to settings_local.py.dist --- settings_local.py.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'settings_local.py.dist') diff --git a/settings_local.py.dist b/settings_local.py.dist index 8209a9fe..3c37c14e 100644 --- a/settings_local.py.dist +++ b/settings_local.py.dist @@ -10,7 +10,7 @@ import logging logging.basicConfig(filename=os.path.join(SITE_SRC_ROOT, 'log', LOG_FILENAME), level=logging.DEBUG,) #ADMINS and MANAGERS -ADMINS = (('Forum Admin', 'team@cnprog.com'),) +ADMINS = (('Forum Admin', 'forum@example.com'),) MANAGERS = ADMINS #DEBUG SETTINGS -- cgit v1.2.3-1-g7c22 From 818d0b99a9ed70a2f92c59a835a2a51bc66dc7d1 Mon Sep 17 00:00:00 2001 From: Evgeny Fadeev Date: Sat, 28 Nov 2009 00:10:25 -0500 Subject: configuration of javascript base url is no longer needed --- settings_local.py.dist | 3 --- 1 file changed, 3 deletions(-) (limited to 'settings_local.py.dist') diff --git a/settings_local.py.dist b/settings_local.py.dist index 3c37c14e..5447e517 100644 --- a/settings_local.py.dist +++ b/settings_local.py.dist @@ -44,9 +44,6 @@ TIME_ZONE = 'America/Tijuana' # # FORUM_SCRIPT_ALIAS = 'forum/' # -# also make sure to set '/':'/forum' in file templates/content/js/com.cnprog.i18n.js -# this is necessary to make client scripts work in this configuration -# FORUM_SCRIPT_ALIAS = '' #no leading slash, default = '' empty string -- cgit v1.2.3-1-g7c22