Correction path ifconfig
[auf_references_client.git] / auf_references_client / settings.py
1 import os
2
3 # Pages d'erreur
4 REFERENCES_TEMPLATE_DIRS = [
5 os.path.dirname(__file__),
6 ]
7
8 # ROA
9 ROA_MODELS = True # set to False if you'd like to develop/test locally
10
11 ROA_FORMAT = 'django'
12 SERIALIZATION_MODULES = {
13 'django' : 'auf_references_client.serializers',
14 }
15 ROA_HEADERS = {
16 'Content-Type': 'application/x-www-form-urlencoded',
17 }
18 ROA_DJANGO_ERRORS = True # useful to ease debugging if you use test server
19
20
21 import os
22 ip = os.popen("/sbin/ifconfig eth0 | grep inet | "
23 "awk '{print $2}' | sed -e s/.*://", "r").read().strip()
24 ROA_BASE_URL = "http://auf_references.auf/roa/"
25 if ip.startswith("199.84.140."):
26 ROA_BASE_URL = "http://references.auf.org/roa/"
27
28
29 ROA_URL_OVERRIDES_LIST = {
30 'auf_references_modeles.region': ROA_BASE_URL + 'region/',
31 'auf_references_modeles.pays': ROA_BASE_URL + 'pays/',
32 'auf_references_modeles.personne': ROA_BASE_URL + 'personne/',
33 'auf_references_modeles.groupe': ROA_BASE_URL + 'groupe/',
34 'auf_references_modeles.groupespersonne': ROA_BASE_URL + 'groupespersonne/',
35 'auf_references_modeles.utilisateur': ROA_BASE_URL + 'utilisateur/',
36 'auf_references_modeles.adresse': ROA_BASE_URL + 'adresse/',
37 'auf_references_modeles.etablissement': ROA_BASE_URL + 'etablissement/',
38 'auf_references_modeles.etablissementhistory': ROA_BASE_URL + 'etablissement/histo/',
39 'auf_references_modeles.responsableetablissement': ROA_BASE_URL + 'etablissement/responsable/',
40 'auf_references_modeles.implantation': ROA_BASE_URL + 'implantation/',
41 'auf_references_modeles.responsableimplantation': ROA_BASE_URL + 'implantation/responsable/',
42 'auf_references_modeles.typeimplantation': ROA_BASE_URL + 'typeimplantation/',
43 'auf_references_modeles.employeresponsable': ROA_BASE_URL + 'employeresponsable/',
44 }
45
46 USERS_AS_STAFF = False