summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2010-04-17 17:46:00 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2010-04-17 17:46:00 -0400
commit8bdbbba0359d7626c721a2862f1fce48cb79b905 (patch)
tree7cf944378d4fc5e4a8561c1e100b01b04adf5f13
parent0762b79da73cb02e1be04c2de4aaa55eda221901 (diff)
downloadaskbot-8bdbbba0359d7626c721a2862f1fce48cb79b905.tar.gz
askbot-8bdbbba0359d7626c721a2862f1fce48cb79b905.tar.bz2
askbot-8bdbbba0359d7626c721a2862f1fce48cb79b905.zip
minor style fixes
-rw-r--r--INSTALL188
-rw-r--r--askbot.wsgi.dist7
-rw-r--r--django.wsgi12
-rwxr-xr-xforum/const.py2
-rw-r--r--forum/skins/default/media/images/logo.gifbin1496 -> 2272 bytes
-rwxr-xr-xforum/skins/default/media/style/style.css15
-rw-r--r--forum/skins/default/templates/header.html2
7 files changed, 94 insertions, 132 deletions
diff --git a/INSTALL b/INSTALL
index bd3ac60d..fbc9c7b4 100644
--- a/INSTALL
+++ b/INSTALL
@@ -4,7 +4,7 @@ A. PREREQUISITES
B. INSTALLATION
1. Settings file
2. Database
- 3. Running OSQA in the development server
+ 3. Running Askbot in the development server
4. Installation under Apache/WSGI
5. Full text search
6. Email subscriptions
@@ -16,27 +16,32 @@ D. CUSTOMIZATION
A. PREREQUISITES
-----------------------------------------------
+Note: by default all installation activity is made in the superuser 'root' account.
+This can be achieved either by logging in as root (su root),
+or - if you have program sudo installed - prefix all commands with sudo.
+So sodo will be listed below as optional.
+
0. We recommend you to use python-setuptools to install pre-requirement libraries.
If you haven't installed it, please try to install it first.
-e.g, sudo apt-get install python-setuptools
+e.g, [sudo] apt-get install python-setuptools
+
+1. Python2.5/2.6, Django v1.1.1
-1. Python2.5/2.6, MySQL, Django v1.0/1.1
-Note: email subscription sender job requires Django 1.1, everything else works with 1.0
-Make sure mysql for python provider has been installed.
-sudo easy_install mysql-python
+1A If you are using MySQL, mysql client for python must be installed
+[sudo] easy_install mysql-python
2. Python-openid v2.2
http://openidenabled.com/python-openid/
-sudo easy_install python-openid
+[sudo] easy_install python-openid
4. html5lib
http://code.google.com/p/html5lib/
Used for HTML sanitizer
-sudo easy_install html5lib
+[sudo] easy_install html5lib
5. Markdown2
http://code.google.com/p/python-markdown2/
-sudo easy_install markdown2
+[sudo] easy_install markdown2
6. Django Debug Toolbar
http://github.com/robhudson/django-debug-toolbar/tree/master
@@ -56,7 +61,12 @@ Notice that you will need to register with recaptcha.net and receive
recaptcha public and private keys that need to be saved in your
settings_local.py file
-NOTES: django_authopenid is included into OSQA code
+11. South
+http://south.aeracode.org/docs/installation.html
+Used for database schema and data migrations
+[sudo] easy_install South
+
+NOTES: django_authopenid is included into Askbot code
and is significantly modified. http://code.google.com/p/django-authopenid/
no need to install this library
@@ -64,14 +74,20 @@ B. INSTALLATION
-----------------------------------------------
0. Make sure you have all above python libraries installed.
- make osqa installation server-readable on Linux command might be:
- chown -R yourlogin:apache /path/to/OSQA
+ DO NOT name the main directory 'askbot' - this name is reserved
+ for the future name of the app file itself.
+
+ make askbot installation server-readable on Linux command might be:
+ chown -R yourlogin:apache /path/to/askbot-site
- directories templates/upfiles and log must be server writable
+ directories:
+ /path/to/askbot-site/forum/upfiles
+ /path/to/askbot-site/log
+ must be server writable
on Linux type chmod
- chmod -R g+w /path/to/OSQA/upfiles
- chmod -R g+w /path/to/log
+ chmod -R g+w /path/to/askbot-site/forum/upfiles
+ chmod -R g+w /path/to/askbot-site/log
above it is assumed that webserver runs under group named "apache"
@@ -82,16 +98,32 @@ update all your settings. Check settings.py and update
it as well if necessory.
Section C explains configuration paramaters.
+Minimally required modification of settings_local.py are
+DATABASE_NAME
+DATABASE_USER
+DATABASE_PASSWORD
+DATABASE_ENGINE
+
+If you set these up, and your database is ready (see section 2),
+run:
+
+python manage.py syncdb
+python manage.py runserver `hostname -i`:8000
+(choose another port number if you wish)
+
+and askbot should be running - if you have any issues at this point (or later:)
+please post them at http://askbot.org/meta
+
2. Database
Prepare your database by using the same database/account
configuration from above.
e.g,
-create database osqa DEFAULT CHARACTER SET UTF8 COLLATE utf8_general_ci;
-grant all on osqa.* to 'osqa'@'localhost';
+create database askbot DEFAULT CHARACTER SET UTF8 COLLATE utf8_general_ci;
+grant all on askbot.* to 'askbot'@'localhost';
And then run "python manage.py syncdb" to synchronize your database.
-3. Running OSQA on the development server
+3. Running Askbot on the development server
Run "python manage.py runserver" to startup django
development environment.
@@ -103,29 +135,10 @@ when using the test server
4. Installation under Apache/WSGI
-4.1 Prepare wsgi script
-
-Make a file readable by your webserver with the following content:
-
----------
-import os
-import sys
-
-sys.path.insert(0,'/one/level/above') #insert to make sure that forum will be found
-sys.path.append('/one/level/above/OSQA') #maybe this is not necessary
-os.environ['DJANGO_SETTINGS_MODULE'] = 'OSQA.settings'
-import django.core.handlers.wsgi
-application = django.core.handlers.wsgi.WSGIHandler()
------------
-
-insert method is used for path because if the forum directory name
-is by accident the same as some other python module
-you wull see strange errors - forum won't be found even though
-it's in the python path. for example using name "test" is
-not a good idea - as there is a module with such name
-
+The main wsgi script is in the file django.wsgi
+it does not need to be modified
-4.2 Configure webserver
+4.1 Configure webserver
Settings below are not perfect but may be a good starting point
---------
@@ -138,26 +151,26 @@ WSGIPythonEggs /var/python/eggs #must be readable and writable by apache
#this allows "rooting" forum at http://example.com/forum, if you like
<VirtualHost ...your ip...:80>
ServerAdmin forum@example.com
- DocumentRoot /path/to/osqa-site
+ DocumentRoot /path/to/askbot-site
ServerName example.com
#run mod_wsgi process for django in daemon mode
#this allows avoiding confused timezone settings when
#another application runs in the same virtual host
- WSGIDaemonProcess OSQA
- WSGIProcessGroup OSQA
+ WSGIDaemonProcess askbot
+ WSGIProcessGroup askbot
#force all content to be served as static files
#otherwise django will be crunching images through itself wasting time
- Alias /m/ /path/to/osqa-site/forum/skins/
- Alias /upfiles/ /path/to/osqa-site/forum/upfiles/
- <Directory /path/to/osqa-site/forum/skins>
+ Alias /m/ /path/to/askbot-site/forum/skins/
+ Alias /upfiles/ /path/to/askbot-site/forum/upfiles/
+ <Directory /path/to/askbot-site/forum/skins>
Order deny,allow
Allow from all
</Directory>
#this is your wsgi script described in the prev section
- WSGIScriptAlias / /path/to/osqa-site/osqa.wsgi
+ WSGIScriptAlias / /path/to/askbot-site/django.wsgi
#this will force admin interface to work only
#through https (optional)
@@ -166,20 +179,20 @@ WSGIPythonEggs /var/python/eggs #must be readable and writable by apache
RewriteEngine on
RewriteRule /nimda(.*)$ https://example.com/nimda$1 [L,R=301]
</Location>
- CustomLog /var/log/httpd/OSQA/access_log common
- ErrorLog /var/log/httpd/OSQA/error_log
+ CustomLog /var/log/httpd/askbot/access_log common
+ ErrorLog /var/log/httpd/askbot/error_log
</VirtualHost>
#(optional) run admin interface under https
<VirtualHost ..your ip..:443>
ServerAdmin forum@example.com
- DocumentRoot /path/to/osqa-site
+ DocumentRoot /path/to/askbot-site
ServerName example.com
SSLEngine on
SSLCertificateFile /path/to/ssl-certificate/server.crt
SSLCertificateKeyFile /path/to/ssl-certificate/server.key
- WSGIScriptAlias / /path/to/osqa-site/osqa.wsgi
- CustomLog /var/log/httpd/OSQA/access_log common
- ErrorLog /var/log/httpd/OSQA/error_log
+ WSGIScriptAlias / /path/to/askbot-site/django.wsgi
+ CustomLog /var/log/httpd/askbot/access_log common
+ ErrorLog /var/log/httpd/askbot/error_log
DirectoryIndex index.html
</VirtualHost>
-------------
@@ -196,9 +209,9 @@ WSGIPythonEggs /var/python/eggs #must be readable and writable by apache
configure sphinx, sample configuration can be found in
sphinx/sphinx.conf file usually goes somewhere in /etc tree
- build osqa index first time manually
+ build askbot index first time manually
- % indexer --config /path/to/sphinx.conf --index osqa
+ % indexer --config /path/to/sphinx.conf --index askbot
setup cron job to rebuild index periodically with command
your crontab entry may be something like
@@ -246,69 +259,10 @@ There are some demo scripts under sql_scripts folder,
including badges and test accounts for CNProg.com. You
don't need them to run your sample.
-C. CONFIGURATION PARAMETERS
-
-#the only parameter that needs to be touched in settings.py is
-DEBUG=False #set to True to enable debug mode
-
-#all forum parameters are set in file settings_local.py
-
-LOG_FILENAME = 'osqa.log' #where logging messages should go
-DATABASE_NAME = 'osqa' # Or path to database file if using sqlite3.
-DATABASE_USER = '' # Not used with sqlite3.
-DATABASE_PASSWORD = '' # Not used with sqlite3.
-DATABASE_ENGINE = 'mysql' #mysql, etc
-SERVER_EMAIL = ''
-DEFAULT_FROM_EMAIL = ''
-EMAIL_HOST_USER = ''
-EMAIL_HOST_PASSWORD = '' #not necessary if mailserver is run on local machine
-EMAIL_SUBJECT_PREFIX = '[OSQA] '
-EMAIL_HOST='osqa.com'
-EMAIL_PORT='25'
-EMAIL_USE_TLS=False
-TIME_ZONE = 'America/Tijuana'
-APP_TITLE = u'OSQA Q&A Forum' #title of your forum
-APP_KEYWORDS = u'OSQA,forum,community' #keywords for search engines
-APP_DESCRIPTION = u'Ask and answer questions.' #site description for searche engines
-APP_INTRO = u'<p>Ask and answer questions, make the world better!</p>' #slogan that goes to front page in logged out mode
-APP_COPYRIGHT = '' #copyright message
-
-#if you set FORUM_SCRIPT_ALIAS= 'forum/'
-#then OSQA will run at url http://example.com/forum
-#FORUM_SCRIPT_ALIAS cannot have leading slash, otherwise it can be set to anything
-FORUM_SCRIPT_ALIAS = '' #no leading slash, default = '' empty string
-
-LANGUAGE_CODE = 'en' #forum language (see language instructions on the wiki)
-EMAIL_VALIDATION = 'off' #string - on|off
-MIN_USERNAME_LENGTH = 1
-EMAIL_UNIQUE = False #if True, email addresses must be unique in all accounts
-APP_URL = 'http://osqa.com' #used by email notif system and RSS
-GOOGLE_SITEMAP_CODE = '' #code for google site crawler (look up google webmaster tools)
-GOOGLE_ANALYTICS_KEY = '' #key to enable google analytics on this site
-BOOKS_ON = False #if True - books tab will be on
-WIKI_ON = True #if False - community wiki feature is disabled
-
-#experimental - allow password login through external site
-#must implement django_authopenid/external_login.py
-#included prototype external_login works with Mediawiki
-USE_EXTERNAL_LEGACY_LOGIN = True #if false OSQA uses it's own login/password
-EXTERNAL_LEGACY_LOGIN_HOST = 'login.osqa.com'
-EXTERNAL_LEGACY_LOGIN_PORT = 80
-EXTERNAL_LEGACY_LOGIN_PROVIDER_NAME = '<span class="orange">OSQA</span>'
-
-FEEDBACK_SITE_URL = None #None or url
-LOGIN_URL = '/%s%s%s' % (FORUM_SCRIPT_ALIAS,'account/','signin/')
-
-DJANGO_VERSION = 1.1 #must be either 1.0 or 1.1
-RESOURCE_REVISION=4 #increment when you update media files - clients will be forced to load new version
-
-D. Customization
+C. Customization
Other than settings_local.py the following will most likely need customization:
* locale/*/django.po - language files that may also contain your site-specific messages
if you want to start with english messages file - look for words like "forum" and
- "OSQA" in the msgstr lines
-* templates/header.html and templates/footer.html may contain extra links
-* templates/about.html - a place to explain for is your forum for
-* templates/faq.html - put answers to users frequent questions
-* templates/content/style/style.css - modify style sheet to add disctinctive look to your forum
+ "Askbot" in the msgstr lines
+* skins
diff --git a/askbot.wsgi.dist b/askbot.wsgi.dist
deleted file mode 100644
index c3a269da..00000000
--- a/askbot.wsgi.dist
+++ /dev/null
@@ -1,7 +0,0 @@
-import os
-import sys
-sys.path.append('/path/to_dir_above')
-sys.path.append('/path/to_dir_above/osqa')
-os.environ['DJANGO_SETTINGS_MODULE'] = 'osqa.settings'
-import django.core.handlers.wsgi
-application = django.core.handlers.wsgi.WSGIHandler()
diff --git a/django.wsgi b/django.wsgi
new file mode 100644
index 00000000..83274865
--- /dev/null
+++ b/django.wsgi
@@ -0,0 +1,12 @@
+import os
+import sys
+
+current_directory = os.path.dirname(__file__)
+parent_directory = os.path.dirname(current_directory)
+module_name = os.path.basename(current_directory)
+
+sys.path.append(parent_directory)
+sys.path.append(current_directory)
+os.environ['DJANGO_SETTINGS_MODULE'] = '%s.settings' % module_name
+import django.core.handlers.wsgi
+application = django.core.handlers.wsgi.WSGIHandler()
diff --git a/forum/const.py b/forum/const.py
index 11c833ea..bc9a7a8f 100755
--- a/forum/const.py
+++ b/forum/const.py
@@ -47,7 +47,7 @@ POST_SORT_METHODS = (
#todo: add assertion here that all sort methods are unique
#because they are keys to the hash used in implementations of Q.run_advanced_search
-DEFAULT_POST_SORT_METHOD = 'latest'
+DEFAULT_POST_SORT_METHOD = 'active'
POST_SCOPE_LIST = (
('all', _('all')),
('unanswered', _('unanswered')),
diff --git a/forum/skins/default/media/images/logo.gif b/forum/skins/default/media/images/logo.gif
index e4d2b957..03eb79f4 100644
--- a/forum/skins/default/media/images/logo.gif
+++ b/forum/skins/default/media/images/logo.gif
Binary files differ
diff --git a/forum/skins/default/media/style/style.css b/forum/skins/default/media/style/style.css
index f96e9d67..3f51e619 100755
--- a/forum/skins/default/media/style/style.css
+++ b/forum/skins/default/media/style/style.css
@@ -272,13 +272,16 @@ blockquote {
}
#logo {
- padding: 5px 0px 0px 0px;
+ padding: 0px 0px 0px 10px;
+ height: 90px;
+ width: 70px;
}
#logoContainer {
}
#navTabContainer {
- width: 500px;
+ width: 600px;
+ padding-left: 10px;
text-align: left;
}
@@ -306,8 +309,8 @@ blockquote {
height: 25px;
line-height: 30px;
margin-left: 10px;
- font-size: 14px;
- font-weight: 400;
+ font-size: 18px;
+ font-weight: 100;
text-decoration: none;
display: block;
float: left;
@@ -331,7 +334,7 @@ blockquote {
}
#navBar .nav a.special {
- font-size: 14px;
+ font-size: 18px;
color: #B02B2C;
font-weight: bold;
text-decoration: none;
@@ -548,7 +551,7 @@ blockquote {
.short-summary {
position: relative;
padding: 3px 5px 5px 10px;
- border-top: 1px dotted #ccccce;
+ border-top: 1px dashed #ccccce;
overflow: hidden;
width: 700px;
float: left;
diff --git a/forum/skins/default/templates/header.html b/forum/skins/default/templates/header.html
index 5d634dd7..0a1a3296 100644
--- a/forum/skins/default/templates/header.html
+++ b/forum/skins/default/templates/header.html
@@ -19,7 +19,7 @@
<td id="logoContainer">
<div id="logo">
<a href="{% url questions %}?start_over=true"><img
- src="{% media "/media/images/logo.png" %}" title="{% trans "back to home page" %}" alt="{{settings.APP_TITLE}} logo"/></a>
+ src="{% media "/media/images/logo.gif" %}" title="{% trans "back to home page" %}" alt="{{settings.APP_TITLE}} logo"/></a>
</div>
</td>
<td id="navTabContainer" valign="bottom" align="left">