1
+ """
2
+ Django settings for mvp_landing project.
3
+
4
+ Generated by 'django-admin startproject' using Django 1.8.2.
5
+
6
+ For more information on this file, see
7
+ https://docs.djangoproject.com/en/1.8/topics/settings/
8
+
9
+ For the full list of settings and their values, see
10
+ https://docs.djangoproject.com/en/1.8/ref/settings/
11
+ """
12
+
13
+ # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
14
+ import os
15
+
16
+ BASE_DIR = os .path .dirname (os .path .dirname (os .path .abspath (__file__ )))
17
+
18
+
19
+ # Quick-start development settings - unsuitable for production
20
+ # See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
21
+
22
+ # SECURITY WARNING: keep the secret key used in production secret!
23
+ SECRET_KEY = '=aci89qhfnz2owcw55h4^ua(aedsg56u5efny&fo6m3ujiq%39'
24
+
25
+ # SECURITY WARNING: don't run with debug turned on in production!
26
+ DEBUG = True
27
+
28
+ TEMPLATE_DEBUG = DEBUG
29
+
30
+ ALLOWED_HOSTS = []
31
+
32
+
33
+ EMAIL_USE_TLS = True
34
+ EMAIL_HOST = 'smtp.gmail.com'
35
+ EMAIL_HOST_USER = '[email protected] '
36
+ EMAIL_HOST_PASSWORD = 'Nycl1ving'
37
+ EMAIL_PORT = 587
38
+
39
+ # Application definition
40
+
41
+ INSTALLED_APPS = (
42
+ 'django.contrib.admin' ,
43
+ 'django.contrib.auth' ,
44
+ 'django.contrib.contenttypes' ,
45
+ 'django.contrib.sessions' ,
46
+ 'django.contrib.messages' ,
47
+ 'django.contrib.staticfiles' ,
48
+ 'signups' ,
49
+ 'rest_framework' ,
50
+ )
51
+
52
+ MIDDLEWARE_CLASSES = (
53
+ 'django.contrib.sessions.middleware.SessionMiddleware' ,
54
+ 'django.middleware.common.CommonMiddleware' ,
55
+ 'django.middleware.csrf.CsrfViewMiddleware' ,
56
+ 'django.contrib.auth.middleware.AuthenticationMiddleware' ,
57
+ #'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
58
+ 'django.contrib.messages.middleware.MessageMiddleware' ,
59
+ 'django.middleware.clickjacking.XFrameOptionsMiddleware' ,
60
+ # 'django.middleware.security.SecurityMiddleware',
61
+ )
62
+ APPEND_SLASH = True
63
+ ROOT_URLCONF = 'mvp_landing.urls'
64
+
65
+
66
+ WSGI_APPLICATION = 'wsgi.application'
67
+
68
+
69
+ # Database
70
+ # https://docs.djangoproject.com/en/1.8/ref/settings/#databases
71
+
72
+ DATABASES = {
73
+ 'default' : {
74
+ 'ENGINE' : 'django.db.backends.sqlite3' ,
75
+ 'NAME' : os .path .join (BASE_DIR , 'db.sqlite3' ),
76
+ }
77
+ }
78
+
79
+
80
+ # Internationalization
81
+ # https://docs.djangoproject.com/en/1.8/topics/i18n/
82
+
83
+ LANGUAGE_CODE = 'en-us'
84
+
85
+ TIME_ZONE = 'UTC'
86
+
87
+ USE_I18N = True
88
+
89
+ USE_L10N = True
90
+
91
+ USE_TZ = True
92
+
93
+
94
+ # Static files (CSS, JavaScript, Images)
95
+ # https://docs.djangoproject.com/en/1.8/howto/static-files/
96
+
97
+ STATIC_URL = '/static/'
98
+
99
+ #Template location
100
+
101
+ TEMPLATE_DIRS = (os .path .join (os .path .dirname (BASE_DIR ),"static" ,"templates" )),
102
+
103
+ if DEBUG :
104
+ MEDIA_URL = '/media/'
105
+ STATIC_ROOT = os .path .join (os .path .dirname (BASE_DIR ),"static" ,"static-only" )
106
+ MEDIA_ROOT = os .path .join (os .path .dirname (BASE_DIR ),"static" ,"media" )
107
+ STATICFILES_DIRS = (
108
+ os .path .join (os .path .dirname (BASE_DIR ), "static" , "static" ),
109
+ )
110
+
111
+
112
+ REST_FRAMEWORK = {
113
+ # Use Django's standard `django.contrib.auth` permissions,
114
+ # or allow read-only access for unauthenticated users.
115
+ 'DEFAULT_PERMISSION_CLASSES' : [
116
+ 'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly'
117
+ ]
118
+ }
0 commit comments