import os
from django.conf import settings
-# Absolute path to the directory that holds media.
-# Example: "/home/media/media.lawrence.com/"
-MEDIA_ROOT = getattr(settings, 'OE_MEDIA_ROOT',
- os.path.join(os.path.dirname(__file__), 'media'))
-PRIVE_MEDIA_ROOT = getattr(settings, 'OE_PRIV_MEDIA_ROOT',
- os.path.join(os.path.dirname(__file__), 'media_prive'))
+# default
+MEDIA_ROOT = getattr(settings, 'MEDIA_ROOT', None)
+PRIVE_MEDIA_ROOT = getattr(settings, 'PRIVE_MEDIA_ROOT', None)
+MEDIA_URL = getattr(settings, 'MEDIA_URL', None)
+PRIVE_MEDIA_URL = getattr(settings, 'PRIVE_MEDIA_URL', None)
-# URL that handles the media served from MEDIA_ROOT. Make sure to use a
-# trailing slash if there is a path component (optional in other cases).
-# Examples: "http://media.lawrence.com", "http://example.com/media/"
-MEDIA_URL = '/media/'
-PRIVE_MEDIA_URL = '/prive/'
+# custom
+OE_MEDIA_ROOT = getattr(settings, 'OE_MEDIA_ROOT', MEDIA_ROOT)
+OE_PRIVE_MEDIA_ROOT = getattr(settings, 'OE_PRIV_MEDIA_ROOT', PRIVE_MEDIA_ROOT)
+OE_MEDIA_URL = getattr(settings, 'OE_MEDIA_URL', MEDIA_URL)
+OE_PRIVE_MEDIA_URL = getattr(settings, 'OE_PRIVE_MEDIA_URL', PRIVE_MEDIA_URL)
RECRUTEMENT_URLS = {'DEV': getattr(settings, 'RECRUTEMENT_URL', 'http://127.0.0.1:8000/api/'),
'TEST':'http://test.ressources-humaines.auf.org/api/',