from django.core.urlresolvers import reverse_lazy
import os,sys
from os.path import dirname, join, exists
import logging.config

LOGFILE_BASE = 'wsgi'

#print os.environ

if 'django_mode' in os.environ:
    #if 'mod_wsgi.process_group' in os.environ:
    LOGFILE_BASE = 'wsgi'
else:
    print "running debug server"
    LOGFILE_BASE = 'dbg'


# Build paths inside the project like this: join(BASE_DIR, "directory")
BASE_DIR = dirname(dirname(dirname(__file__)))
STATIC_ROOT = join(BASE_DIR, '..', 'site', 'static')
STATICFILES_DIRS = [
    join(BASE_DIR, 'static')
    ]
MEDIA_ROOT = join(BASE_DIR, 'media')
MEDIA_URL = "/media/"
STATIC_URL = '/static/'

MENU_SELECT_PARENTS=True
MENU_HIDE_EMPTY=False
# Log everything to the logs directory at the top
LOGFILE_ROOT = join(dirname(BASE_DIR), 'logs')

# Use Django templates using the new Django 1.8 TEMPLATES settings
TEMPLATES = [
    {