summaryrefslogtreecommitdiff
path: root/docs/src/INSTALL.t2t
diff options
context:
space:
mode:
Diffstat (limited to 'docs/src/INSTALL.t2t')
-rw-r--r--docs/src/INSTALL.t2t79
1 files changed, 60 insertions, 19 deletions
diff --git a/docs/src/INSTALL.t2t b/docs/src/INSTALL.t2t
index f8366c968..6804f030b 100644
--- a/docs/src/INSTALL.t2t
+++ b/docs/src/INSTALL.t2t
@@ -34,7 +34,7 @@ Optionaly:
The easier way to obtain most these packages is to get them from your favorite Linux distribution repositories.
For instance the packages for Debian squeeze are get with:
```
-$ apt-get install apache2 python python-django python-psycopg2 gettext postgresql-8.4 libjs-jquery libjs-jquery-ui python-pisa python-django-registration python-utidylib , python-lxml, python-imaging
+$ apt-get install apache2 python python-django python-psycopg2 gettext postgresql-8.4 libjs-jquery libjs-jquery-ui python-pisa python-django-registration python-utidylib python-lxml python-imaging
```
If these packages do not exist in your distribution's repository, please refer to the applications websites.
@@ -68,13 +68,14 @@ If you want to take the bleeding edge version git is necessary. Install the appr
Now that postgres is installed, you need to create a new user for your ishtar instance:
```
-createuser --echo --adduser --createdb --encrypted --pwprompt ishtar-user
+$ su postgres
+$ createuser --echo --adduser --createdb --encrypted --pwprompt ishtar-user
```
Then, you have to create the database:
```
-createdb --echo --owner ishtar-user --encoding UNICODE ishtar "My Ishtar database"
+$ createdb --echo --owner ishtar-user --encoding UNICODE ishtar "My Ishtar database"
```
+++ Getting the sources +++
@@ -82,19 +83,24 @@ createdb --echo --owner ishtar-user --encoding UNICODE ishtar "My Ishtar databas
Currently only the git version is available (in the directory you have decided to place sources - for instance /var/local is a good idea):
```
-cd /var/local/
-git clone git://lysithea.proxience.com/git/ishtar.git
+$ cd /var/local/
+$ git clone git://lysithea.proxience.com/git/ishtar.git
+$ cd ishtar
+$ git checkout prod
```
+"prod" is here the chosen version (do "git branch" to view available branches).
+
+++ Install the sources +++
In your Ishtar application directory create settings.py to fit to your configuration.
A base template is provided (settings.py.example):
```
-cd ishtar/ishtar/
-cp settings.py.example settings.py
-nano settings.py
+$ cd /var/local/ishtar/ishtar/
+$ ISHTAR_DIR=`pwd`
+$ cp settings.py.example settings.py
+$ nano settings.py
####
ROOT_PATH = '/var/local/ishtar/ishtar/'
@@ -126,7 +132,8 @@ DATABASES = {
If your language is available in the locale directory of Ishtar, you will just need to get it compiled. Still being in the Ishtar directory, this can be done with (here, "de" stands for german. Replace it with the appropriate language code):
```
-django-admin compilemessages -l de
+$ cd $ISHTAR_DIR
+$ django-admin compilemessages -l de
```
If your language is not available, feel free to create the default po files and to submit it, contributions are well appreciated. Procedure is as follows :
@@ -134,7 +141,7 @@ If your language is not available, feel free to create the default po files and
You first need to create the default po file (of course, replace "de" according to the language you chose to create) :
```
-django-admin makemessages -l de
+$ django-admin makemessages -l de
```
There should now be a django.po file in locale/de/LC_MESSAGES. Complete it with your translation.
@@ -143,14 +150,48 @@ Now that the translation file is completed, just compile it the same way you wou
+++ Database initialisation +++
-Create the appropriate tables (still being in chimère application directory):
+Check if you have specific initialisation files for your country (this exemple
+for France: "fr"):
+
+```
+$ cd $ISHTAR_DIR
+$ ls ../database/fr
+```
+
+If a file "initial_data.json" exists copy it to a "fixtures" directory in the ishtar application directory.
+
+```
+$ mkdir fixtures
+$ cp ../database/fr/initial_data.json fixtures
+```
+
+Create the appropriate tables (still being in ishtar application directory):
```
-./manage.py syncdb
+$ ./manage.py syncdb
```
You will be prompted for the creation of an administrator account (administration can be found at: http://where_is_ishtar/admin).
-The database is set, congratulations!
+Then create database views (not automatically created by the admin)
+
+```
+$ cd $ISHTAR_DIR
+$ su postgres
+$ psql -U ishtar-user ishtar -f ../database/views.sql
+```
+
+If you have specific files for towns and departments (in the "database/$COUNTRY_CODE" directory),
+you can now insert them in the database:
+
+```
+$ cd $ISHTAR_DIR
+$ ./scripts/import_from_csv.py ../database/fr/departements-insee-2010.csv department
+$ ./scripts/import_from_csv.py ../database/fr/communes-insee-2010.csv town
+```
+
+Of course import departments before towns.
+
+Now the database is set, congratulations!
+++ Webserver configuration +++
@@ -159,15 +200,15 @@ The database is set, congratulations!
Install mod_wsgi for apache
```
-sudo apt-get install libapache2-mod-wsgi
+$ sudo apt-get install libapache2-mod-wsgi
```
Create and edit a configuration for Chimère.
```
-sudo mkdir /var/local/ishtar/apache
-sudo cp /var/local/ishtar/docs/conf/django.wsgi /var/local/ishtar/apache/django.wsgi
-sudo cp /var/local/ishtar/docs/conf/apache-wsgi.conf /etc/apache2/sites-available/ishtar
+$ sudo mkdir /var/local/ishtar/apache
+$ sudo cp /var/local/ishtar/docs/conf/django.wsgi /var/local/ishtar/apache/django.wsgi
+$ sudo cp /var/local/ishtar/docs/conf/apache-wsgi.conf /etc/apache2/sites-available/ishtar
```
Adapt the files django.wsgi (with the correct sys path) and ishtar.
@@ -175,8 +216,8 @@ Adapt the files django.wsgi (with the correct sys path) and ishtar.
To activate the website reload apache.
```
-sudo a2ensite ishtar
-sudo /etc/init.d/apache2 reload
+$ sudo a2ensite ishtar
+$ sudo /etc/init.d/apache2 reload
```