하재연

Update settings.py

1 -""" 1 +"""
2 -Django settings for khudrive project. 2 +Django settings for khudrive project.
3 - 3 +
4 -Generated by 'django-admin startproject' using Django 3.0.7. 4 +Generated by 'django-admin startproject' using Django 3.0.7.
5 - 5 +
6 -For more information on this file, see 6 +For more information on this file, see
7 -https://docs.djangoproject.com/en/3.0/topics/settings/ 7 +https://docs.djangoproject.com/en/3.0/topics/settings/
8 - 8 +
9 -For the full list of settings and their values, see 9 +For the full list of settings and their values, see
10 -https://docs.djangoproject.com/en/3.0/ref/settings/ 10 +https://docs.djangoproject.com/en/3.0/ref/settings/
11 -""" 11 +"""
12 - 12 +
13 -import os 13 +import os
14 - 14 +
15 -# Build paths inside the project like this: os.path.join(BASE_DIR, ...) 15 +# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
16 -BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 16 +BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
17 - 17 +
18 - 18 +
19 -# Quick-start development settings - unsuitable for production 19 +# Quick-start development settings - unsuitable for production
20 -# See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/ 20 +# See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/
21 - 21 +
22 -# SECURITY WARNING: keep the secret key used in production secret! 22 +# SECURITY WARNING: keep the secret key used in production secret!
23 -SECRET_KEY = ')i0_(*4t7k3=rcqp*_i0u((9zbk8q(2(3tk(%$woji-e-37=o*' 23 +SECRET_KEY = ')i0_(*4t7k3=rcqp*_i0u((9zbk8q(2(3tk(%$woji-e-37=o*'
24 - 24 +
25 -# SECURITY WARNING: don't run with debug turned on in production! 25 +# SECURITY WARNING: don't run with debug turned on in production!
26 -DEBUG = True 26 +DEBUG = True
27 - 27 +
28 -ALLOWED_HOSTS = [] 28 +ALLOWED_HOSTS = []
29 - 29 +
30 - 30 +
31 -# Application definition 31 +# Application definition
32 - 32 +
33 -INSTALLED_APPS = [ 33 +INSTALLED_APPS = [
34 - 'django.contrib.admin', 34 + 'django.contrib.admin',
35 - 'django.contrib.auth', 35 + 'django.contrib.auth',
36 - 'django.contrib.contenttypes', 36 + 'django.contrib.contenttypes',
37 - 'django.contrib.sessions', 37 + 'django.contrib.sessions',
38 - 'django.contrib.messages', 38 + 'django.contrib.messages',
39 - 'django.contrib.staticfiles', 39 + 'django.contrib.staticfiles',
40 - 'rest_framework', 40 + 'rest_framework',
41 - 'api.apps.ApiConfig', 41 + 'api.apps.ApiConfig',
42 -] 42 +]
43 - 43 +
44 -MIDDLEWARE = [ 44 +MIDDLEWARE = [
45 - 'django.middleware.security.SecurityMiddleware', 45 + 'django.middleware.security.SecurityMiddleware',
46 - 'django.contrib.sessions.middleware.SessionMiddleware', 46 + 'django.contrib.sessions.middleware.SessionMiddleware',
47 - 'django.middleware.common.CommonMiddleware', 47 + 'django.middleware.common.CommonMiddleware',
48 - 'django.middleware.csrf.CsrfViewMiddleware', 48 + 'django.middleware.csrf.CsrfViewMiddleware',
49 - 'django.contrib.auth.middleware.AuthenticationMiddleware', 49 + 'django.contrib.auth.middleware.AuthenticationMiddleware',
50 - 'django.contrib.messages.middleware.MessageMiddleware', 50 + 'django.contrib.messages.middleware.MessageMiddleware',
51 - 'django.middleware.clickjacking.XFrameOptionsMiddleware', 51 + 'django.middleware.clickjacking.XFrameOptionsMiddleware',
52 -] 52 +]
53 - 53 +
54 -ROOT_URLCONF = 'khudrive.urls' 54 +ROOT_URLCONF = 'khudrive.urls'
55 - 55 +
56 -TEMPLATES = [ 56 +TEMPLATES = [
57 - { 57 + {
58 - 'BACKEND': 'django.template.backends.django.DjangoTemplates', 58 + 'BACKEND': 'django.template.backends.django.DjangoTemplates',
59 - 'DIRS': [], 59 + 'DIRS': [],
60 - 'APP_DIRS': True, 60 + 'APP_DIRS': True,
61 - 'OPTIONS': { 61 + 'OPTIONS': {
62 - 'context_processors': [ 62 + 'context_processors': [
63 - 'django.template.context_processors.debug', 63 + 'django.template.context_processors.debug',
64 - 'django.template.context_processors.request', 64 + 'django.template.context_processors.request',
65 - 'django.contrib.auth.context_processors.auth', 65 + 'django.contrib.auth.context_processors.auth',
66 - 'django.contrib.messages.context_processors.messages', 66 + 'django.contrib.messages.context_processors.messages',
67 - ], 67 + ],
68 - }, 68 + },
69 - }, 69 + },
70 -] 70 +]
71 - 71 +
72 -WSGI_APPLICATION = 'khudrive.wsgi.application' 72 +WSGI_APPLICATION = 'khudrive.wsgi.application'
73 - 73 +
74 - 74 +
75 -# Database 75 +# Database
76 -# https://docs.djangoproject.com/en/3.0/ref/settings/#databases 76 +# https://docs.djangoproject.com/en/3.0/ref/settings/#databases
77 -DATABASES = { 77 +DATABASES = {
78 - # 'default': { 78 + # 'default': {
79 - # 'ENGINE': 'django.db.backends.sqlite3', 79 + # 'ENGINE': 'django.db.backends.sqlite3',
80 - # 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), 80 + # 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
81 - # } 81 + # }
82 - 'default': { 82 + 'default': {
83 - 'ENGINE': 'django.db.backends.postgresql', 83 + 'ENGINE': 'django.db.backends.postgresql_psycopg2',
84 - 'NAME': 'khuDrive', 84 + 'NAME': 'khuDrive',
85 - 'USER': 'jooheekwon', 85 + 'USER': 'hjy',
86 - 'PASSWORD': '', 86 + 'PASSWORD': '2521',
87 - 'HOST': 'localhost', 87 + 'HOST': 'localhost',
88 - 'PORT': '', 88 + 'PORT': '5432',
89 - } 89 + }
90 -} 90 +}
91 - 91 +
92 - 92 +
93 -# Password validation 93 +# Password validation
94 -# https://docs.djangoproject.com/en/3.0/ref/settings/#auth-password-validators 94 +# https://docs.djangoproject.com/en/3.0/ref/settings/#auth-password-validators
95 - 95 +
96 -AUTH_PASSWORD_VALIDATORS = [ 96 +AUTH_PASSWORD_VALIDATORS = [
97 - { 97 + {
98 - 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 98 + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
99 - }, 99 + },
100 - { 100 + {
101 - 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 101 + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
102 - }, 102 + },
103 - { 103 + {
104 - 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', 104 + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
105 - }, 105 + },
106 - { 106 + {
107 - 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', 107 + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
108 - }, 108 + },
109 -] 109 +]
110 - 110 +
111 - 111 +
112 -# Internationalization 112 +# Internationalization
113 -# https://docs.djangoproject.com/en/3.0/topics/i18n/ 113 +# https://docs.djangoproject.com/en/3.0/topics/i18n/
114 - 114 +
115 -LANGUAGE_CODE = 'en-us' 115 +LANGUAGE_CODE = 'en-us'
116 - 116 +
117 -TIME_ZONE = 'UTC' 117 +TIME_ZONE = 'UTC'
118 - 118 +
119 -USE_I18N = True 119 +USE_I18N = True
120 - 120 +
121 -USE_L10N = True 121 +USE_L10N = True
122 - 122 +
123 -USE_TZ = True 123 +USE_TZ = True
124 - 124 +
125 - 125 +
126 -# Static files (CSS, JavaScript, Images) 126 +# Static files (CSS, JavaScript, Images)
127 -# https://docs.djangoproject.com/en/3.0/howto/static-files/ 127 +# https://docs.djangoproject.com/en/3.0/howto/static-files/
128 - 128 +
129 -STATIC_URL = '/static/' 129 +STATIC_URL = '/static/'
......