選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
このリポジトリはアーカイブされています。 ファイルの閲覧とクローンは可能ですが、プッシュや、課題・プルリクエストのオープンはできません。

148 行
3.7 KiB

  1. """
  2. Django settings for workx project.
  3. Generated by 'django-admin startproject' using Django 4.1.5.
  4. For more information on this file, see
  5. https://docs.djangoproject.com/en/4.1/topics/settings/
  6. For the full list of settings and their values, see
  7. https://docs.djangoproject.com/en/4.1/ref/settings/
  8. """
  9. from pathlib import Path
  10. # Build paths inside the project like this: BASE_DIR / 'subdir'.
  11. BASE_DIR = Path(__file__).resolve().parent.parent
  12. # Quick-start development settings - unsuitable for production
  13. # See https://docs.djangoproject.com/en/4.1/howto/deployment/checklist/
  14. # SECURITY WARNING: keep the secret key used in production secret!
  15. SECRET_KEY = 'django-insecure-)c#cqk!av3fuey9jjywjs_b2z5l%r*!09h0-@+wxxzq-c4o_fi'
  16. # SECURITY WARNING: don't run with debug turned on in production!
  17. DEBUG = True
  18. ALLOWED_HOSTS = ['*']
  19. GOOGLE_OAUTH2_CLIENT_ID = "611194092059-kk4bhv18i19cvngmi3335gtvk4nmp25d.apps.googleusercontent.com"
  20. GOOGLE_OAUTH2_CLIENT_SECRET ="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"
  21. # Application definition
  22. INSTALLED_APPS = [
  23. 'django.contrib.admin',
  24. 'django.contrib.auth',
  25. 'django.contrib.contenttypes',
  26. 'django.contrib.sessions',
  27. 'django.contrib.staticfiles',
  28. 'company',
  29. 'common',
  30. 'accounts',
  31. 'employee',
  32. 'client',
  33. 'rest_framework',
  34. "django.contrib.messages",
  35. "google_auth",
  36. ]
  37. MIDDLEWARE = [
  38. 'django.middleware.security.SecurityMiddleware',
  39. 'django.contrib.sessions.middleware.SessionMiddleware',
  40. 'django.middleware.common.CommonMiddleware',
  41. 'django.middleware.csrf.CsrfViewMiddleware',
  42. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  43. 'django.contrib.messages.middleware.MessageMiddleware',
  44. 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  45. ]
  46. ROOT_URLCONF = 'workx.urls'
  47. TEMPLATES = [
  48. {
  49. 'BACKEND': 'django.template.backends.django.DjangoTemplates',
  50. 'DIRS': [],
  51. 'APP_DIRS': True,
  52. 'OPTIONS': {
  53. 'context_processors': [
  54. 'django.template.context_processors.debug',
  55. 'django.template.context_processors.request',
  56. 'django.contrib.auth.context_processors.auth',
  57. 'django.contrib.messages.context_processors.messages',
  58. ],
  59. },
  60. },
  61. ]
  62. WSGI_APPLICATION = 'workx.wsgi.application'
  63. # AUTH_PASSWORD_VALIDATORS = [
  64. # {
  65. # "NAME": "django.contrib.auth.password_validation."
  66. # "UserAttributeSimilarityValidator",
  67. # },
  68. # {
  69. # "NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
  70. # },
  71. # {
  72. # "NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",
  73. # },
  74. # {
  75. # "NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",
  76. # },
  77. # ]
  78. # Database
  79. # https://docs.djangoproject.com/en/4.1/ref/settings/#databases
  80. DATABASES = {
  81. 'default': {
  82. 'ENGINE': 'django.db.backends.postgresql_psycopg2',
  83. 'NAME': 'workxx',
  84. 'USER': 'postgres',
  85. 'PASSWORD': '123456',
  86. 'HOST': 'localhost',
  87. 'PORT': '5432',
  88. }
  89. }
  90. # Password validation
  91. # https://docs.djangoproject.com/en/4.1/ref/settings/#auth-password-validators
  92. # GOOGLE_SSO_SCOPES = [ # default values
  93. # "openid",
  94. # "https://www.googleapis.com/auth/userinfo.email",
  95. # "https://www.googleapis.com/auth/userinfo.profile",
  96. # ]
  97. # Internationalization
  98. # https://docs.djangoproject.com/en/4.1/topics/i18n/
  99. LANGUAGE_CODE = 'en-us'
  100. TIME_ZONE = 'UTC'
  101. USE_I18N = True
  102. USE_TZ = True
  103. # Static files (CSS, JavaScript, Images)
  104. # https://docs.djangoproject.com/en/4.1/howto/static-files/
  105. STATIC_URL = 'static/'
  106. # Default primary key field type
  107. # https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field
  108. DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'