[askbot] update to 0.7.24 * made it possible to disable the anonymous user greeting altogether (Raghu Udiyar)
Rahul Sundaram
sundaram at fedoraproject.org
Tue Oct 4 09:13:03 UTC 2011
commit 7d91a3870fd89fea3ecd92ffdf6eb78da3aa48e5
Author: Rahul Sundaram <sundaram at fedoraproject.org>
Date: Tue Oct 4 14:42:01 2011 +0530
update to 0.7.24
* made it possible to disable the anonymous user greeting altogether (Raghu Udiyar)
* added annotations for the meanings of user levels on the "moderation" page. (Jishnu)
* auto-link patterns - e.g. to bug databases - are configurable from settings. (Arun SAG)
.gitignore | 5 +-
README.fedora | 64 +++++++++++++++
askbot-httpd.conf | 28 +++++++
askbot-settings.py | 216 ++++++++++++++++++++++++++++++++++++++++++++++++++++
askbot.spec | 13 +++-
askbot.wsgi | 9 ++
sources | 6 +-
7 files changed, 329 insertions(+), 12 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 09ee110..7b52796 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,8 +6,5 @@
/askbot-0.7.19.tar.gz
/askbot-0.7.20.tar.gz
/askbot-0.7.22.tar.gz
-/askbot-httpd.conf
-/askbot.wsgi
-/README.fedora
-/askbot-settings.py
/askbot-0.7.23.tar.gz
+/askbot-0.7.24.tar.gz
diff --git a/README.fedora b/README.fedora
new file mode 100644
index 0000000..fdf9145
--- /dev/null
+++ b/README.fedora
@@ -0,0 +1,64 @@
+Askbot RPM package has extra configuration to making it easier to deploy
+multiple sites in the same system and make it suitable for packaging. All
+changes have been reviewed by Evgeny Fadeev, primary Askbot developer.
+
+* /usr/sbin/askbot.wsgi provides the wsgi interface
+* /etc/askbot provides site configuration templates
+* /etc/httpd/conf.d/askbot.conf is a Apache HTTP configuration template
+
+askbot.wsgi
+===========
+
+The askbot.wsgi file is designed to be usable without changes by any site.
+Configuration is done in the /etc/httpd/conf.d/askbot.conf file and the
+settings files under /etc/askbot.
+
+/etc/httpd/conf.d/askbot.conf
+=============================
+
+This is a sample file for setting up an askbot instance. If you want to run
+multiple sites, you need to copy this file and modify the python-path to point
+to a different site configuration directory for every site. For instance::
+
+ # cd /etc/httpd/conf.d
+ # cp askbot.conf myask.conf
+ # edit myasksite.conf to change:
+ - WSGIDaemonProcess askbot user=apache group=apache maximum-requests=1000 display-name=askbot processes=6 threads=1 shutdown-timeout=10 python-path=/etc/askbot/sites/ask
+ + WSGIDaemonProcess askbot user=apache group=apache maximum-requests=1000 display-name=askbot processes=6 threads=1 shutdown-timeout=10 python-path=/etc/askbot/sites/myask
+
+/etc/askbot
+===========
+
+The rpm creates an /etc/askbot directory which holds configuration information
+for each site. To setup a new site, you need to create a directory under sites
+that matches the python-path you set in the httd config file above and then
+copy the setup_templates directory to 'config' under that new directory.
+The apache user will need to be able to read these files but you want to make
+sure that no one else can (since you'll have database passwords in them).
+Here's an example, continuing to call the new site "myask"::
+
+ # cd /etc/askbot/sites
+ # mkdir myask
+ # cp -pr ../setup_templates myask/conf
+ # chown -R apache:apache myask
+
+Then you need to modify the configuration settings for the askbot site for your
+environment. These are found in the settings.py file that you copied into the
+new site configuration directory
+(/etc/askbot/sites/myask/config/settings.py in our example). The
+minimal things you'll need to change are:
+
+* setting the DATABASE* variables to reference your database
+
+* setting ASKBOT_FILE_UPLOAD_DIR to an upload directory for your site.
+ Remember to create the directory as well. The rpm package provides
+ /var/lib/askbot/upfiles for you and you can add a directory
+ to that per-site like this::
+
+ # cd /var/lib/askbot/upfiles
+ # mkdir myask
+ # chown apache:apache myask
+
+* setting LOG_FILENAME to something unique for your site. The rpm package has
+ configured /var/log/askbot for log files, if you set LOG_FILENAME =
+ 'myask.log', the log file will appear in /var/log/askbot/myask.log
diff --git a/askbot-httpd.conf b/askbot-httpd.conf
new file mode 100644
index 0000000..bf902d9
--- /dev/null
+++ b/askbot-httpd.conf
@@ -0,0 +1,28 @@
+Alias /m/ /usr/lib/python2.6/site-packages/askbot/skins/
+Alias /admin/media/ /usr/lib/python2.6/site-packages/django/contrib/admin/media/
+
+<Directory /usr/lib/python2.6/site-packages/askbot/skins>
+ Order deny,allow
+ Allow from all
+</Directory>
+
+WSGIDaemonProcess askbot user=apache group=apache maximum-requests=1000 display-name=askbot processes=6 threads=1 shutdown-timeout=10 python-path=/etc/askbot/sites/ask
+WSGISocketPrefix run/wsgi
+WSGIRestrictStdout On
+WSGIRestrictSignal Off
+WSGIPythonOptimize 1
+
+WSGIScriptAlias / /usr/sbin/askbot.wsgi
+
+<Location />
+ WSGIProcessGroup askbot
+ Order deny,allow
+ Allow from all
+</Location>
+
+Alias /upfiles/ /var/lib/askbot/upfiles/ask/
+
+<Directory /var/lib/askbot/upfiles/ask>
+ Order deny,allow
+ Allow from all
+</Directory>
diff --git a/askbot-settings.py b/askbot-settings.py
new file mode 100644
index 0000000..8a18cc1
--- /dev/null
+++ b/askbot-settings.py
@@ -0,0 +1,216 @@
+## Django settings for ASKBOT enabled project.
+import os.path
+import logging
+import sys
+import askbot
+
+#this line is added so that we can import pre-packaged askbot dependencies
+sys.path.append(os.path.join(os.path.dirname(askbot.__file__), 'deps'))
+
+DEBUG = False#set to True to enable debugging
+TEMPLATE_DEBUG = False#keep false when debugging jinja2 templates
+INTERNAL_IPS = ('127.0.0.1',)
+
+ADMINS = (
+ ('Your Name', 'your_email at domain.com'),
+)
+
+MANAGERS = ADMINS
+
+DATABASE_ENGINE = 'postgresql_psycopg2' # only postgres (>8.3) and mysql are supported so far others have not been tested yet
+DATABASE_NAME = '@DATABASENAME@' # Or path to database file if using sqlite3.
+DATABASE_USER = '' # Not used with sqlite3.
+DATABASE_PASSWORD = '' # Not used with sqlite3.
+DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
+DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
+
+#outgoing mail server settings
+SERVER_EMAIL = ''
+DEFAULT_FROM_EMAIL = ''
+EMAIL_HOST_USER = ''
+EMAIL_HOST_PASSWORD = ''
+EMAIL_SUBJECT_PREFIX = ''
+EMAIL_HOST=''
+EMAIL_PORT=''
+EMAIL_USE_TLS=False
+EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
+
+#incoming mail settings
+#after filling out these settings - please
+#go to the site's live settings and enable the feature
+#"Email settings" -> "allow asking by email"
+#
+# WARNING: command post_emailed_questions DELETES all
+# emails from the mailbox each time
+# do not use your personal mail box here!!!
+#
+IMAP_HOST = ''
+IMAP_HOST_USER = ''
+IMAP_HOST_PASSWORD = ''
+IMAP_PORT = ''
+IMAP_USE_TLS = False
+
+# Local time zone for this installation. Choices can be found here:
+# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
+# although not all choices may be available on all operating systems.
+# On Unix systems, a value of None will cause Django to use the same
+# timezone as the operating system.
+# If running in a Windows environment this must be set to the same as your
+# system time zone.
+TIME_ZONE = 'America/Chicago'
+
+SITE_ID = 1
+
+# If you set this to False, Django will make some optimizations so as not
+# to load the internationalization machinery.
+USE_I18N = True
+LANGUAGE_CODE = 'en'
+
+# Absolute path to the directory that holds media.
+# Example: "/home/media/media.lawrence.com/"
+ASKBOT_FILE_UPLOAD_DIR = '/var/lib/askbot/upfiles/@SITENAME@'
+PROJECT_ROOT = os.path.dirname(__file__)
+
+# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
+# trailing slash.
+# Examples: "http://foo.com/media/", "/media/".
+ADMIN_MEDIA_PREFIX = '/admin/media/'
+
+# Make up some unique string, and don't share it with anybody.
+SECRET_KEY = 'sdljdfjkldsflsdjkhsjkldgjlsdgfs s '
+
+# List of callables that know how to import templates from various sources.
+TEMPLATE_LOADERS = (
+ 'django.template.loaders.filesystem.load_template_source',
+ 'django.template.loaders.app_directories.load_template_source',
+ #below is askbot stuff for this tuple
+ 'askbot.skins.loaders.load_template_source',
+ #'django.template.loaders.eggs.load_template_source',
+)
+
+
+MIDDLEWARE_CLASSES = (
+ #'django.middleware.gzip.GZipMiddleware',
+ 'django.contrib.sessions.middleware.SessionMiddleware',
+ #'django.middleware.cache.UpdateCacheMiddleware',
+ 'django.middleware.common.CommonMiddleware',
+ #'django.middleware.cache.FetchFromCacheMiddleware',
+ 'django.contrib.auth.middleware.AuthenticationMiddleware',
+ #'django.middleware.sqlprint.SqlPrintingMiddleware',
+
+ #below is askbot stuff for this tuple
+ 'askbot.middleware.anon_user.ConnectToSessionMessagesMiddleware',
+ 'askbot.middleware.pagesize.QuestionsPageSizeMiddleware',
+ 'askbot.middleware.cancel.CancelActionMiddleware',
+ 'django.middleware.transaction.TransactionMiddleware',
+ #'debug_toolbar.middleware.DebugToolbarMiddleware',
+ 'askbot.middleware.view_log.ViewLogMiddleware',
+ 'askbot.middleware.spaceless.SpacelessMiddleware',
+)
+
+
+ROOT_URLCONF = os.path.basename(os.path.dirname(__file__)) + '.urls'
+
+
+#UPLOAD SETTINGS
+FILE_UPLOAD_TEMP_DIR = os.path.join(
+ os.path.dirname(__file__),
+ 'tmp'
+ ).replace('\\','/')
+
+FILE_UPLOAD_HANDLERS = (
+ 'django.core.files.uploadhandler.MemoryFileUploadHandler',
+ 'django.core.files.uploadhandler.TemporaryFileUploadHandler',
+)
+ASKBOT_ALLOWED_UPLOAD_FILE_TYPES = ('.jpg', '.jpeg', '.gif', '.bmp', '.png', '.tiff')
+ASKBOT_MAX_UPLOAD_FILE_SIZE = 1024 * 1024 #result in bytes
+DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
+
+
+#TEMPLATE_DIRS = (,) #template have no effect in askbot, use the variable below
+#ASKBOT_EXTRA_SKIN_DIR = #path to your private skin collection
+#take a look here http://askbot.org/en/question/207/
+
+TEMPLATE_CONTEXT_PROCESSORS = (
+ 'django.core.context_processors.request',
+ 'askbot.context.application_settings',
+ #'django.core.context_processors.i18n',
+ 'askbot.user_messages.context_processors.user_messages',#must be before auth
+ 'django.core.context_processors.auth', #this is required for admin
+ 'django.core.context_processors.csrf', #necessary for csrf protection
+)
+
+
+INSTALLED_APPS = (
+ 'django.contrib.auth',
+ 'django.contrib.contenttypes',
+ 'django.contrib.sessions',
+ 'django.contrib.sites',
+
+ #all of these are needed for the askbot
+ 'django.contrib.admin',
+ 'django.contrib.humanize',
+ 'django.contrib.sitemaps',
+ #'debug_toolbar',
+ 'askbot',
+ 'askbot.deps.django_authopenid',
+ #'askbot.importers.stackexchange', #se loader
+ 'south',
+ 'askbot.deps.livesettings',
+ 'keyedcache',
+ 'robots',
+ 'django_countries',
+ 'djcelery',
+ 'djkombu',
+ 'followit',
+ #'avatar',#experimental use git clone git://github.com/ericflo/django-avatar.git$
+ #requires setting of MEDIA_ROOT and MEDIA_URL
+)
+
+
+#setup memcached for production use!
+#see http://docs.djangoproject.com/en/1.1/topics/cache/ for details
+CACHE_BACKEND = 'locmem://'
+#needed for django-keyedcache
+CACHE_TIMEOUT = 6000
+CACHE_PREFIX = 'askbot' #make this unique
+#If you use memcache you may want to uncomment the following line to enable memcached based sessions
+#SESSION_ENGINE = 'django.contrib.sessions.backends.cache_db'
+
+AUTHENTICATION_BACKENDS = (
+ 'django.contrib.auth.backends.ModelBackend',
+ 'askbot.deps.django_authopenid.backends.AuthBackend',
+)
+
+#logging settings
+LOG_FILENAME = 'askbot.log'
+logging.basicConfig(
+ filename=os.path.join('/var', 'log', 'askbot', LOG_FILENAME),
+ level=logging.CRITICAL,
+ format='%(pathname)s TIME: %(asctime)s MSG: %(filename)s:%(funcName)s:%(lineno)d %(message)s',
+)
+
+###########################
+#
+# this will allow running your forum with url like http://site.com/forum
+#
+# ASKBOT_URL = 'forum/'
+#
+ASKBOT_URL = '' #no leading slash, default = '' empty string
+_ = lambda v:v #fake translation function for the login url
+LOGIN_URL = '/%s%s%s' % (ASKBOT_URL,_('account/'),_('signin/'))
+#note - it is important that upload dir url is NOT translated!!!
+#also, this url must not have the leading slash
+ASKBOT_UPLOADED_FILES_URL = '%s%s' % (ASKBOT_URL, 'upfiles/')
+ALLOW_UNICODE_SLUGS = False
+ASKBOT_USE_STACKEXCHANGE_URLS = False #mimic url scheme of stackexchange
+
+#Celery Settings
+BROKER_BACKEND = "djkombu.transport.DatabaseTransport"
+CELERY_ALWAYS_EAGER = True
+
+import djcelery
+djcelery.setup_loader()
+
+CSRF_COOKIE_NAME = 'askbot_scrf'
+CSRF_COOKIE_DOMAIN = ''#enter domain name here - e.g. example.com
diff --git a/askbot.spec b/askbot.spec
index c558704..571761a 100644
--- a/askbot.spec
+++ b/askbot.spec
@@ -1,5 +1,5 @@
Name: askbot
-Version: 0.7.23
+Version: 0.7.24
Release: 1%{?dist}
Summary: Question and Answer forum
Group: Applications/Publishing
@@ -118,7 +118,8 @@ install -p -m 644 %{SOURCE4} .
%{python_sitelib}/%{name}/bin/
%{python_sitelib}/%{name}/conf/
%{python_sitelib}/%{name}/const/
-%{python_sitelib}/%{name}/cron/
+%{python_sitelib}/%{name}/cron
+%{python_sitelib}/%{name}/db
%{python_sitelib}/%{name}/deployment/
%{python_sitelib}/%{name}/skins/
%{python_sitelib}/%{name}/templatetags/
@@ -147,10 +148,16 @@ install -p -m 644 %{SOURCE4} .
%{python_sitelib}/askbot*.egg-info
%changelog
+* Tue Oct 04 2011 Rahul Sundaram <sundaram at fedoraproject.org> - 0.7.24-1
+- update to 0.7.24
+ * made it possible to disable the anonymous user greeting altogether (Raghu Udiyar)
+ * added annotations for the meanings of user levels on the "moderation" page. (Jishnu)
+ * auto-link patterns - e.g. to bug databases - are configurable from settings. (Arun SAG)
+
* Wed Sep 28 2011 Rahul Sundaram <sundaram at fedoraproject.org> - 0.7.23-1
- fix group and description
- update httpd configuration for upfiles
-- update to 0.7.33
+- update to 0.7.23
* greeting for anonymous users can be changed from live settings (Hrishi)
* greeting for anonymous users is shown only once (Rag Sagar)
* added support for akismet spam detection service (Adolfo Fitoria)
diff --git a/askbot.wsgi b/askbot.wsgi
new file mode 100644
index 0000000..f435052
--- /dev/null
+++ b/askbot.wsgi
@@ -0,0 +1,9 @@
+#!/usr/bin/python
+import os
+import sys
+
+os.environ['DJANGO_SETTINGS_MODULE'] = 'config.settings'
+
+import django.core.handlers.wsgi
+application = django.core.handlers.wsgi.WSGIHandler()
+
diff --git a/sources b/sources
index a89289a..a79e2a2 100644
--- a/sources
+++ b/sources
@@ -1,5 +1 @@
-79d409e85d3e4e06f874ec66ea8b3eb4 askbot-settings.py
-d3e89396688d6af837b2b95decd71270 askbot.wsgi
-dc7de4340addba734f1d155f0a6414de README.fedora
-1e1e248545c17680dd692b9d9c544ea0 askbot-0.7.23.tar.gz
-4f900099d19e74b8a337443915fcd4a3 askbot-httpd.conf
+e3fa145a9c31fb87ad34e024b7928ec4 askbot-0.7.24.tar.gz
More information about the scm-commits
mailing list