Skip to content

Commit 6fd183a

Browse files
committed
fixed up INSTALL, settings_local.py.dist and replaced strings osqa->askbot everywhere, except main README file
1 parent 8822e0f commit 6fd183a

File tree

17 files changed

+165
-351
lines changed

17 files changed

+165
-351
lines changed

.project

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<projectDescription>
3-
<name>osqa</name>
3+
<name>askbot</name>
44
<comment></comment>
55
<projects>
66
</projects>

.pydevproject

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
66
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.6</pydev_property>
77
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
8-
<path>/osqa</path>
8+
<path>/askbot</path>
99
</pydev_pathproperty>
1010
</pydev_project>

HOW_TO_DEBUG

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ logging.debug('') #this will add time, line number, function and file record
1818
#etc - take a look at http://docs.python.org/library/logging.html
1919
-------------------------------
2020

21-
in OSQA logging is currently set up in settings_local.py.dist
21+
in Askbot logging is currently set up in settings_local.py.dist
2222
please update it if you need - in older revs logging strings have less info
2323

2424
messages of interest can be grepped out of the log file by module/file/function name
2525
e.g. to take out all django_authopenid logs run:
26-
>grep 'osqa\/django_authopenid' log/django.osqa.log | sed 's/^.*MSG: //'
26+
>grep 'askbot\/django_authopenid' log/django.askbot.log | sed 's/^.*MSG: //'
2727
in the example above 'sed' call truncates out a long prefix
2828
and makes output look more meaningful
2929

3030
2) DJANGO DEBUG TOOLBAR
31-
osqa works with django debug toolbar
31+
askbot works with django debug toolbar
3232
if debugging under apache server, check
3333
that debug toolbar media is loaded correctly
3434
if toolbar is enabled but you do not see it, possibly some Alias statement

INSTALL

+52-89
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ A. PREREQUISITES
44
B. INSTALLATION
55
1. Settings file
66
2. Database
7-
3. Running OSQA in the development server
7+
3. Running Askbot in the development server
88
4. Installation under Apache/WSGI
99
5. Full text search
1010
6. Email subscriptions
@@ -56,22 +56,28 @@ Notice that you will need to register with recaptcha.net and receive
5656
recaptcha public and private keys that need to be saved in your
5757
settings_local.py file
5858

59-
NOTES: django_authopenid is included into OSQA code
59+
NOTES: django_authopenid is included into Askbot code
6060
and is significantly modified. http://code.google.com/p/django-authopenid/
6161
no need to install this library
6262

6363
B. INSTALLATION
6464
-----------------------------------------------
6565
0. Make sure you have all above python libraries installed.
6666

67-
make osqa installation server-readable on Linux command might be:
68-
chown -R yourlogin:apache /path/to/OSQA
67+
DO NOT name the main directory 'askbot' - this name is reserved
68+
for the future name of the app file itself.
6969

70-
directories templates/upfiles and log must be server writable
70+
make askbot installation server-readable on Linux command might be:
71+
chown -R yourlogin:apache /path/to/askbot-site
72+
73+
directories:
74+
/path/to/askbot-site/forum/upfiles
75+
/path/to/askbot-site/log
76+
must be server writable
7177

7278
on Linux type chmod
73-
chmod -R g+w /path/to/OSQA/upfiles
74-
chmod -R g+w /path/to/log
79+
chmod -R g+w /path/to/askbot-site/forum/upfiles
80+
chmod -R g+w /path/to/askbot-site/log
7581

7682
above it is assumed that webserver runs under group named "apache"
7783

@@ -82,16 +88,32 @@ update all your settings. Check settings.py and update
8288
it as well if necessory.
8389
Section C explains configuration paramaters.
8490

91+
Minimally required modification of settings_local.py are
92+
DATABASE_NAME
93+
DATABASE_USER
94+
DATABASE_PASSWORD
95+
DATABASE_ENGINE
96+
97+
If you set these up, and your database is ready (see section 2),
98+
run:
99+
100+
python manage.py syncdb
101+
python manage.py runserver `hostname -i`:8000
102+
(choose another port number if you wish)
103+
104+
and askbot should be running - if you have any issues at this point (or later:)
105+
please post them at http://askbot.org/meta
106+
85107
2. Database
86108

87109
Prepare your database by using the same database/account
88110
configuration from above.
89111
e.g,
90-
create database osqa DEFAULT CHARACTER SET UTF8 COLLATE utf8_general_ci;
91-
grant all on osqa.* to 'osqa'@'localhost';
112+
create database askbot DEFAULT CHARACTER SET UTF8 COLLATE utf8_general_ci;
113+
grant all on askbot.* to 'askbot'@'localhost';
92114
And then run "python manage.py syncdb" to synchronize your database.
93115

94-
3. Running OSQA on the development server
116+
3. Running Askbot on the development server
95117

96118
Run "python manage.py runserver" to startup django
97119
development environment.
@@ -112,8 +134,8 @@ import os
112134
import sys
113135

114136
sys.path.insert(0,'/one/level/above') #insert to make sure that forum will be found
115-
sys.path.append('/one/level/above/OSQA') #maybe this is not necessary
116-
os.environ['DJANGO_SETTINGS_MODULE'] = 'OSQA.settings'
137+
sys.path.append('/one/level/above/askbot-site') #maybe this is not necessary
138+
os.environ['DJANGO_SETTINGS_MODULE'] = 'askbot-site.settings'
117139
import django.core.handlers.wsgi
118140
application = django.core.handlers.wsgi.WSGIHandler()
119141
-----------
@@ -138,26 +160,26 @@ WSGIPythonEggs /var/python/eggs #must be readable and writable by apache
138160
#this allows "rooting" forum at http://example.com/forum, if you like
139161
<VirtualHost ...your ip...:80>
140162
ServerAdmin [email protected]
141-
DocumentRoot /path/to/osqa-site
163+
DocumentRoot /path/to/askbot-site
142164
ServerName example.com
143165

144166
#run mod_wsgi process for django in daemon mode
145167
#this allows avoiding confused timezone settings when
146168
#another application runs in the same virtual host
147-
WSGIDaemonProcess OSQA
148-
WSGIProcessGroup OSQA
169+
WSGIDaemonProcess askbot
170+
WSGIProcessGroup askbot
149171

150172
#force all content to be served as static files
151173
#otherwise django will be crunching images through itself wasting time
152-
Alias /m/ /path/to/osqa-site/forum/skins/
153-
Alias /upfiles/ /path/to/osqa-site/forum/upfiles/
154-
<Directory /path/to/osqa-site/forum/skins>
174+
Alias /m/ /path/to/askbot-site/forum/skins/
175+
Alias /upfiles/ /path/to/askbot-site/forum/upfiles/
176+
<Directory /path/to/askbot-site/forum/skins>
155177
Order deny,allow
156178
Allow from all
157179
</Directory>
158180

159181
#this is your wsgi script described in the prev section
160-
WSGIScriptAlias / /path/to/osqa-site/osqa.wsgi
182+
WSGIScriptAlias / /path/to/askbot-site/askbot.wsgi
161183

162184
#this will force admin interface to work only
163185
#through https (optional)
@@ -166,20 +188,20 @@ WSGIPythonEggs /var/python/eggs #must be readable and writable by apache
166188
RewriteEngine on
167189
RewriteRule /nimda(.*)$ https://example.com/nimda$1 [L,R=301]
168190
</Location>
169-
CustomLog /var/log/httpd/OSQA/access_log common
170-
ErrorLog /var/log/httpd/OSQA/error_log
191+
CustomLog /var/log/httpd/askbot/access_log common
192+
ErrorLog /var/log/httpd/askbot/error_log
171193
</VirtualHost>
172194
#(optional) run admin interface under https
173195
<VirtualHost ..your ip..:443>
174196
ServerAdmin [email protected]
175-
DocumentRoot /path/to/osqa-site
197+
DocumentRoot /path/to/askbot-site
176198
ServerName example.com
177199
SSLEngine on
178200
SSLCertificateFile /path/to/ssl-certificate/server.crt
179201
SSLCertificateKeyFile /path/to/ssl-certificate/server.key
180-
WSGIScriptAlias / /path/to/osqa-site/osqa.wsgi
181-
CustomLog /var/log/httpd/OSQA/access_log common
182-
ErrorLog /var/log/httpd/OSQA/error_log
202+
WSGIScriptAlias / /path/to/askbot-site/askbot.wsgi
203+
CustomLog /var/log/httpd/askbot/access_log common
204+
ErrorLog /var/log/httpd/askbot/error_log
183205
DirectoryIndex index.html
184206
</VirtualHost>
185207
-------------
@@ -196,9 +218,9 @@ WSGIPythonEggs /var/python/eggs #must be readable and writable by apache
196218
configure sphinx, sample configuration can be found in
197219
sphinx/sphinx.conf file usually goes somewhere in /etc tree
198220

199-
build osqa index first time manually
221+
build askbot index first time manually
200222

201-
% indexer --config /path/to/sphinx.conf --index osqa
223+
% indexer --config /path/to/sphinx.conf --index askbot
202224

203225
setup cron job to rebuild index periodically with command
204226
your crontab entry may be something like
@@ -246,69 +268,10 @@ There are some demo scripts under sql_scripts folder,
246268
including badges and test accounts for CNProg.com. You
247269
don't need them to run your sample.
248270

249-
C. CONFIGURATION PARAMETERS
250-
251-
#the only parameter that needs to be touched in settings.py is
252-
DEBUG=False #set to True to enable debug mode
253-
254-
#all forum parameters are set in file settings_local.py
255-
256-
LOG_FILENAME = 'osqa.log' #where logging messages should go
257-
DATABASE_NAME = 'osqa' # Or path to database file if using sqlite3.
258-
DATABASE_USER = '' # Not used with sqlite3.
259-
DATABASE_PASSWORD = '' # Not used with sqlite3.
260-
DATABASE_ENGINE = 'mysql' #mysql, etc
261-
SERVER_EMAIL = ''
262-
DEFAULT_FROM_EMAIL = ''
263-
EMAIL_HOST_USER = ''
264-
EMAIL_HOST_PASSWORD = '' #not necessary if mailserver is run on local machine
265-
EMAIL_SUBJECT_PREFIX = '[OSQA] '
266-
EMAIL_HOST='osqa.com'
267-
EMAIL_PORT='25'
268-
EMAIL_USE_TLS=False
269-
TIME_ZONE = 'America/Tijuana'
270-
APP_TITLE = u'OSQA Q&A Forum' #title of your forum
271-
APP_KEYWORDS = u'OSQA,forum,community' #keywords for search engines
272-
APP_DESCRIPTION = u'Ask and answer questions.' #site description for searche engines
273-
APP_INTRO = u'<p>Ask and answer questions, make the world better!</p>' #slogan that goes to front page in logged out mode
274-
APP_COPYRIGHT = '' #copyright message
275-
276-
#if you set FORUM_SCRIPT_ALIAS= 'forum/'
277-
#then OSQA will run at url http://example.com/forum
278-
#FORUM_SCRIPT_ALIAS cannot have leading slash, otherwise it can be set to anything
279-
FORUM_SCRIPT_ALIAS = '' #no leading slash, default = '' empty string
280-
281-
LANGUAGE_CODE = 'en' #forum language (see language instructions on the wiki)
282-
EMAIL_VALIDATION = 'off' #string - on|off
283-
MIN_USERNAME_LENGTH = 1
284-
EMAIL_UNIQUE = False #if True, email addresses must be unique in all accounts
285-
APP_URL = 'http://osqa.com' #used by email notif system and RSS
286-
GOOGLE_SITEMAP_CODE = '' #code for google site crawler (look up google webmaster tools)
287-
GOOGLE_ANALYTICS_KEY = '' #key to enable google analytics on this site
288-
BOOKS_ON = False #if True - books tab will be on
289-
WIKI_ON = True #if False - community wiki feature is disabled
290-
291-
#experimental - allow password login through external site
292-
#must implement django_authopenid/external_login.py
293-
#included prototype external_login works with Mediawiki
294-
USE_EXTERNAL_LEGACY_LOGIN = True #if false OSQA uses it's own login/password
295-
EXTERNAL_LEGACY_LOGIN_HOST = 'login.osqa.com'
296-
EXTERNAL_LEGACY_LOGIN_PORT = 80
297-
EXTERNAL_LEGACY_LOGIN_PROVIDER_NAME = '<span class="orange">OSQA</span>'
298-
299-
FEEDBACK_SITE_URL = None #None or url
300-
LOGIN_URL = '/%s%s%s' % (FORUM_SCRIPT_ALIAS,'account/','signin/')
301-
302-
DJANGO_VERSION = 1.1 #must be either 1.0 or 1.1
303-
RESOURCE_REVISION=4 #increment when you update media files - clients will be forced to load new version
304-
305-
D. Customization
271+
C. Customization
306272

307273
Other than settings_local.py the following will most likely need customization:
308274
* locale/*/django.po - language files that may also contain your site-specific messages
309275
if you want to start with english messages file - look for words like "forum" and
310-
"OSQA" in the msgstr lines
311-
* templates/header.html and templates/footer.html may contain extra links
312-
* templates/about.html - a place to explain for is your forum for
313-
* templates/faq.html - put answers to users frequent questions
314-
* templates/content/style/style.css - modify style sheet to add disctinctive look to your forum
276+
"Askbot" in the msgstr lines
277+
* skins

INSTALL.pip

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
git://github.com/johnl/deb-sphinx-search.git
1313

1414
* Install a virtual environment OUTSIDE of this directory:
15-
pip install -E ~/env -r osqa-requirements.txt
15+
pip install -E ~/env -r askbot-requirements.txt
1616
[there is discussion on the pinax forums about what it should be outside
1717
the source directory]
1818

0 commit comments

Comments
 (0)