Ajout url ressource discipline et thematique
[auf_references_client.git] / auf_references_client / settings.py
CommitLineData
1c827f00
CR
1import os
2
29f41c46 3# Pages d'erreur
1c827f00 4REFERENCES_TEMPLATE_DIRS = [
a369352e 5 os.path.dirname(__file__),
1c827f00
CR
6]
7
29f41c46 8# ROA
51880961
CR
9ROA_MODELS = True # set to False if you'd like to develop/test locally
10
11ROA_FORMAT = 'django'
12SERIALIZATION_MODULES = {
13 'django' : 'auf_references_client.serializers',
14}
15ROA_HEADERS = {
16 'Content-Type': 'application/x-www-form-urlencoded',
17}
18ROA_DJANGO_ERRORS = True # useful to ease debugging if you use test server
19
20
4b0cd10e 21import os
0c444d5d 22ip = os.popen("/sbin/ifconfig eth0 | grep inet | "
4b0cd10e
CR
23 "awk '{print $2}' | sed -e s/.*://", "r").read().strip()
24ROA_BASE_URL = "http://auf_references.auf/roa/"
c29b0f48 25if ip in ("199.84.140.11", "10.36.0.10", "10.36.0.18"):
4b0cd10e
CR
26 ROA_BASE_URL = "http://references.auf.org/roa/"
27
63fff08d 28
e50e7852 29ROA_URL_OVERRIDES_LIST = {
8b8b0996
CR
30 'auf_references_modeles.region': ROA_BASE_URL + 'region/',
31 'auf_references_modeles.pays': ROA_BASE_URL + 'pays/',
9b7620a4 32 'auf_references_modeles.personne': ROA_BASE_URL + 'personne/',
287a41be
CR
33 'auf_references_modeles.groupe': ROA_BASE_URL + 'groupe/',
34 'auf_references_modeles.groupespersonne': ROA_BASE_URL + 'groupespersonne/',
f090616d 35 'auf_references_modeles.utilisateur': ROA_BASE_URL + 'utilisateur/',
9b7620a4 36 'auf_references_modeles.adresse': ROA_BASE_URL + 'adresse/',
8b8b0996 37 'auf_references_modeles.etablissement': ROA_BASE_URL + 'etablissement/',
e50e7852 38 'auf_references_modeles.etablissementhistory': ROA_BASE_URL + 'etablissement/histo/',
9b7620a4 39 'auf_references_modeles.responsableetablissement': ROA_BASE_URL + 'etablissement/responsable/',
8b8b0996 40 'auf_references_modeles.implantation': ROA_BASE_URL + 'implantation/',
9b7620a4 41 'auf_references_modeles.responsableimplantation': ROA_BASE_URL + 'implantation/responsable/',
8b8b0996
CR
42 'auf_references_modeles.typeimplantation': ROA_BASE_URL + 'typeimplantation/',
43 'auf_references_modeles.employeresponsable': ROA_BASE_URL + 'employeresponsable/',
87073b70
AJ
44 'auf_references_modeles.discipline': ROA_BASE_URL + 'discipline/',
45 'auf_references_modeles.thematique': ROA_BASE_URL + 'thematique/',
e50e7852 46}
51880961 47
782f2060 48USERS_AS_STAFF = False