summaryrefslogtreecommitdiffstats
path: root/askbot/doc/source/initial-configuration.rst
blob: b72dbc348e1d619ee9e01992e325891e72ef3cec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
.. _compile-time-configuration:

===============================
Initial Configuration of Askbot
===============================

While most configuration settings for askbot can be done at any time :ref:`through the web-interface <run-time-configuration>`, some manipulations on the server are still necessary.


Installing Askbot as a new Django project (standalone app)
==========================================================

When installing Askbot for the first time, you will need to initialize the site setup files by typing::

    startforum

and answering the questions. The `startforum` script will ask you where to deploy Askbot. If you are in
the directory where the Askbot project resides, you can answer `.` (`.` refers to the current directory).
There may be an error message; ignore it.

.. note::

    All Django sites have four project-wide files::

        settings.py - the main settings configuration file
        urls.py     - main url configuration
        __init__.py - often empty but needed for Python
        manage.py   - the hook allowing to run management commands

    `startforum` adds those files to the directory you select (and some more things specific to Askbot).


Note that if you already have a Django site you will not want to use `startforum`, because you don't want to just overwrite your existing settings.py. See below for instructions.

Another thing you have to do if you are creating a brand new Django project is edit the file `settings.py`_. At the very minimum, you will need to provide the correct values to::

    DATABASE_ENGINE = '' #e.g. 'mysql'
    DATABASE_NAME = '' #name of the database you created, e.g. 'askbot'.
    DATABASE_USER = '' #name of the database user, e.g. 'askbotuser'.
    DATABASE_PASSWORD = '' #password to the database
    CSRF_COOKIE_DOMAIN = ''#e.g. 'example.com' or 'askbot.example.com' (localhost/IP address for tests)

All values must be enclosed in single quotes, as shown above.

.. note::

    The files settings.py_ and urls.py_ may also need to be touched up 
    when you upgrate the software, because new versions may bring 
    new dependencies and add new site urls.


Adding Askbot to an existing Django project
===========================================

If you are adding askbot to an existing Django project, you will need to
merge settings.py_ and urls.py_ into your project manually. The templates to be used can be found
in the `askbot/setup_templates` subdirectory.


.. _urls.py: http://github.com/ASKBOT/askbot-devel/blob/master/askbot/setup_templates/urls.py
.. _settings.py: http://github.com/ASKBOT/askbot-devel/blob/master/askbot/setup_templates/settings.py