"""
Django settings for django_facebook project.

Generated by 'django-admin startproject' using Django 1.8.11.

For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'n8f#9mr4c0lia#db7em-g4u@-_k#9r^3y8__vf0=b-97kx2n++'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = ['*']


# Application definition

INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.sites',
    'facebook',
)

MIDDLEWARE_CLASSES = (
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
    'django.middleware.security.SecurityMiddleware',
)

ROOT_URLCONF = 'django_facebook.urls'

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [os.path.join(BASE_DIR, "templates")],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                'django.template.context_processors.debug',
                'django.template.context_processors.request',
                'django.contrib.auth.context_processors.auth',
                'django.contrib.messages.context_processors.messages',
            ],
        },
    },
]

WSGI_APPLICATION = 'django_facebook.wsgi.application'


# Database
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
    }
}


# Internationalization
# https://docs.djangoproject.com/en/1.8/topics/i18n/

LANGUAGE_CODE = 'ka'

TIME_ZONE = 'Asia/Tbilisi'

USE_I18N = True

USE_L10N = True

USE_TZ = True

SITE_ID = 1

SITE_URL = ''

# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.8/howto/static-files/
MEDIA_URL = '/media/'

MEDIA_ROOT = os.path.join(BASE_DIR, 'media')

STATIC_URL = '/static/'

STATIC_ROOT = 'staticfiles'

STATICFILES_DIRS = (
        os.path.join(BASE_DIR, 'static'),
)

STATICFILES_FINDERS = (
            'django.contrib.staticfiles.finders.FileSystemFinder',
            'django.contrib.staticfiles.finders.AppDirectoriesFinder',
            #'django.contrib.staticfiles.finders.DefaultStorageFinder',
)

# date formats

INPUT_DATE_FORMATS = [
        '%m/%d/%Y',
]

# Facebook configuration

FACEBOOK_APP_ID = "1666839843562440"
FACEBOOK_APP_SECRET = "473d6b56341532388fa45f27b89b6a16"

FACEBOOK_URL = "http://www.facebook.com/"
AUTHORIZE_URL = "https://graph.facebook.com/oauth/authorize"
ACCESS_TOKEN_URL = "https://graph.facebook.com/oauth/access_token"
API_URL = "https://graph.facebook.com/v2.5/"
REQUEST_PERMISSIONS_URL = "https://www.facebook.com/dialog/oauth?"
GRAPH_ME_URL = "https://graph.facebook.com/v2.5/me"
FACEBOOK_SCOPE = ["email","user_birthday"] # publish_stream
CALLBACK_URL = "http://localhost:8000/callback/"

# Auth backends

AUTHENTICATION_BACKENDS = (
    'django.contrib.auth.backends.ModelBackend',
    'facebook.backend.FacebookBackend',
)

@@ -3286,24 +3286,8 @@
  = %22
-1666839843562440
 %22%0AFA
@@ -3311,40 +3311,8 @@
  = %22
-473d6b56341532388fa45f27b89b6a16
 %22%0A%0AF

update project