# -*- coding: utf-8 -*-
import os, logging

SITE_ID = 1

BASE_DIR = os.path.dirname(os.path.abspath(__file__)).rstrip("/")+"/"
BASE_URL = '/pt/' 
WEB_URL = 'http://localhost'
STATIC_URL = BASE_URL + 'static/site/'
#modifier static _url en fonction de base_static_url et web_url + introduire template tag. regarder reverse qui donne le domaine


STREAM_URL = "%(stream_url)s"

STREAM_SRC_PREFIX = "%(stream_src_prefix)s"

BASE_STATIC_ROOT = os.path.abspath(BASE_DIR + "../static/").rstrip("/")+"/"
BASE_STATIC_URL = BASE_URL + 'static/' 

# Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/"
MEDIA_ROOT = BASE_STATIC_ROOT + "media/"
ADMIN_MEDIA_PREFIX = STATIC_URL + 'admin/'

# Absolute path to the directory that static files (js, css, swf...)
# DO NOT forget to do command line ./manage.py collectstatic to gather static media into the web/static folder
STATIC_ROOT = BASE_STATIC_ROOT + "site/"

# PATH to the ffmpeg executable, used to know automatically the media file duration 
FFMPEG_PATH = "%(ffmpeg_path)s"



# PATH where uploaded media are put.
#STREAM_PATH = CONTENT_ROOT


DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
        'NAME': 'polemictweet_test',                      # Or path to database file if using sqlite3.
        'USER': 'postgres',                      # Not used with sqlite3.
        'PASSWORD': 'admin',                  # Not used with sqlite3.
        'HOST': '',                      # Set to empty string for localhost. Not used with sqlite3.
        'PORT': '5432',                      # Set to empty string for default. Not used with sqlite3.
    }
}

CACHES = {
    'default': {
        'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
    }
}

LOG_FILE = os.path.abspath(os.path.join(BASE_DIR,"../../web/log/log.txt"))
LOG_LEVEL = logging.DEBUG
logging.basicConfig(filename=LOG_FILE, level=LOG_LEVEL)


ADMINS = (
    # ('Your Name', 'your_email@domain.com'),
)

MANAGERS = ADMINS

GOOGLE_ANALYTICS_CODE = '%(google_analytics_code)s'

#EMAIL_USE_TLS = %(email_use_tls)s
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = 'contact.iri@gmail.com'
EMAIL_HOST_PASSWORD = 'Oach8quo'
#EMAIL_PORT = %(email_port)d 


FORBIDDEN_STREAM_URL = "%(forbidden_stream_url)s"



