Update Config template, and add instruction to setting up the virtual env for hdalab in the readme
authorrougeronj
Thu, 20 Nov 2014 11:41:50 +0100
changeset 363 627596669480
parent 358 d162cb0c4386
child 364 5c0628ae52be
Update Config template, and add instruction to setting up the virtual env for hdalab in the readme
src/hdalab/README.txt
src/hdalab/config.py.tmpl
--- a/src/hdalab/README.txt	Fri Nov 14 17:06:02 2014 +0100
+++ b/src/hdalab/README.txt	Thu Nov 20 11:41:50 2014 +0100
@@ -28,7 +28,21 @@
 Pour importer ce fichier:
     python manage.py import_insee_hda_csv <chemin/nom_du_fichier.csv>
     
-    
+== Mise en place de l'Environnement Virtuel ==
+
+0) requis : python 2.6 (64 bits).
+1) installer PostGreSql 9.X car ça tourne en 64 bits.
+3) $ export PYTHONPATH=/path/to/workspace/hdabo/web (/Users/tc/dev/eclipse_workspace/hdabo/web)
+4) ajouter le path jusqu'à pg_config dans les vars d'env : ajouter dans la ligne suivante dans ~/.bashrc :
+  export PATH=$PATH:/Library/PostgreSQL/9.X/bin
+- faire en sorte que ~/.bashrc soit bien pris en compte quand on lance un terminal : ajouter dans la ligne suivante dans /etc/bashrc :
+  [ -r ~/.bashrc ] && . ~/.bashrc
+- se mettre dans le bon répertoire et la création du virtualenv :
+  $ cd /path/to/workspace/hdabo/web (/Users/tc/dev/eclipse_workspace/hdabo/web)
+  $ python create_python_env.py
+  $ python project-boot.py --no-site-packages --type-install=local env/myhdaboenv
+
+
 === Migration hdabo -> hdalab ===
 
 0) appliquer les migrations south
--- a/src/hdalab/config.py.tmpl	Fri Nov 14 17:06:02 2014 +0100
+++ b/src/hdalab/config.py.tmpl	Thu Nov 20 11:41:50 2014 +0100
@@ -58,3 +58,12 @@
 
 GOOGLE_ANALYTICS_CODE = None
 
+HAYSTACK_CONNECTIONS = {
+    'default': {
+        # the elasticsearch_backend is probably temporary
+        #'ENGINE': 'hdabo.search.french_whoosh_backend.SearchBackend',
+        'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine',
+        'URL': 'http://127.0.0.1:9200/',
+        'INDEX_NAME': 'hdabo',
+    },
+}