
try:
    from djangoappengine.settings_base import *
    has_djangoappengine = True
except ImportError:
    has_djangoappengine = False
    DEBUG = True
    TEMPLATE_DEBUG = DEBUG
    
DEBUG = True
TEMPLATE_DEBUG = DEBUG

import os

SERVE_FILE_BACKEND = 'filetransfers.backends.blobsendfile.serve_file'

INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'djangotoolbox',
    'filetransfers',
    'search',
    'gmp',
    'gmpadmin',
    'openid_login',
)

USE_I18N = False

if has_djangoappengine:
    INSTALLED_APPS = ('djangoappengine',) + INSTALLED_APPS

ADMIN_MEDIA_PREFIX = '/media/admin/'
MEDIA_ROOT = os.path.join(os.path.dirname(__file__), 'media')
TEMPLATE_DIRS = (os.path.join(os.path.dirname(__file__), 'templates'),)

ROOT_URLCONF = 'urls'

SECRET_KEY = '=r-$b*8hglm+858&9t043hlm6-&6-3d3vfc4((7yd0dbrakhvi'

# Activate django-dbindexer if available
try:
    import dbindexer
    DATABASES['native'] = DATABASES['default']
    DATABASES['default'] = {'ENGINE': 'dbindexer', 'TARGET': 'native'}
    INSTALLED_APPS += ('dbindexer',)
except ImportError:
    pass

CACHE_BACKEND = 'memcached://?timeout=0'

# Green Mountain Project settings
THUMBNAIL_GEOMETRY_16_9 = (160, 90)
THUMBNAIL_GEOMETRY_1_1 = (128, 128)
PREVIEW_GEOMETRY = (660, 540)
MIN_GEOMETRY = (640, 480)


DEFAULT_PREVIEW_WIDTH = 660
DEFAULT_PREVIEW_HEIGHT = 540
MIN_PHOTO_WIDTH = 640
MIN_PHOTO_HEIGHT = 480

AUTHENTICATION_BACKENDS = (
    'django.contrib.auth.backends.ModelBackend',
    'openid_login.gae_federated_backend.GAEFederatedBackend',
    'openid_login.facebook_backend.FacebookBackend',
)
                
LOGIN_URL = '/openid_login/'
LOGOUT_URL = '/openid_login/logout'
                
API_VERSION = '12'

ADMINS = (
    ('Dan Julius', 'dan.julius@gmail.com'),
)
        
MANAGERS = ADMINS
        
AUTH_PROFILE_MODULE = 'gmp.UserProfile'

FACEBOOK_APP_ID='186932087992297'
FACEBOOK_API_KEY='a6cc04e8b615f93260862be5942a2743'
FACEBOOK_SECRET_KEY='efb45e58dd894c3bf17371f08546eecc'
FACEBOOK_INTERNAL = False

