1# Copyright 2016 Google Inc.  All rights reserved.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#     http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
16import os
17
18BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
19
20# Quick-start development settings - unsuitable for production
21# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
22
23# SECURITY WARNING: keep the secret key used in production secret!
24SECRET_KEY = 'eiw+mvmua#98n@p2xq+c#liz@r2&#-s07nkgz)+$zcl^o4$-$o'
25
26# SECURITY WARNING: don't run with debug turned on in production!
27DEBUG = True
28
29ALLOWED_HOSTS = []
30
31# Application definition
32
33INSTALLED_APPS = (
34    'django.contrib.admin',
35    'django.contrib.auth',
36    'django.contrib.contenttypes',
37    'django.contrib.sessions',
38    'django.contrib.messages',
39    'django.contrib.staticfiles',
40    'polls',
41    'oauth2client.contrib.django_util',
42)
43
44MIDDLEWARE_CLASSES = (
45    'django.contrib.sessions.middleware.SessionMiddleware',
46    'django.middleware.common.CommonMiddleware',
47    'django.middleware.csrf.CsrfViewMiddleware',
48    'django.contrib.auth.middleware.AuthenticationMiddleware',
49    'django.contrib.messages.middleware.MessageMiddleware',
50    'django.middleware.clickjacking.XFrameOptionsMiddleware',
51    'django.middleware.security.SecurityMiddleware',
52)
53
54ROOT_URLCONF = 'myoauth.urls'
55
56TEMPLATES = [
57    {
58        'BACKEND': 'django.template.backends.django.DjangoTemplates',
59        'DIRS': [],
60        'APP_DIRS': True,
61        'OPTIONS': {
62            'context_processors': [
63                'django.template.context_processors.debug',
64                'django.template.context_processors.request',
65                'django.contrib.auth.context_processors.auth',
66                'django.contrib.messages.context_processors.messages',
67            ],
68        },
69    },
70]
71
72WSGI_APPLICATION = 'myoauth.wsgi.application'
73
74# Database
75# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
76
77DATABASES = {
78    'default': {
79        'ENGINE': 'django.db.backends.sqlite3',
80        'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
81    }
82}
83
84# Internationalization
85# https://docs.djangoproject.com/en/1.8/topics/i18n/
86
87LANGUAGE_CODE = 'en-us'
88
89TIME_ZONE = 'UTC'
90
91USE_I18N = True
92
93USE_L10N = True
94
95USE_TZ = True
96
97# Static files (CSS, JavaScript, Images)
98# https://docs.djangoproject.com/en/1.8/howto/static-files/
99
100STATIC_URL = '/static/'
101
102GOOGLE_OAUTH2_CLIENT_ID = 'YOUR_CLIENT_ID'
103
104GOOGLE_OAUTH2_CLIENT_SECRET = 'YOUR_CLIENT_SECRET'
105
106GOOGLE_OAUTH2_SCOPES = (
107    'email', 'profile')
108