settings.py 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. import os
  2. # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
  3. BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
  4. # SECURITY WARNING: keep the secret key used in production secret!
  5. SECRET_KEY = '0t@j@klm8b@2rdl@po$$24pirh$&cg#p6f#)@$@n8^kn7k2%9b'
  6. # SECURITY WARNING: don't run with debug turned on in production!
  7. DEBUG = True
  8. ALLOWED_HOSTS = []
  9. # Application definition
  10. INSTALLED_APPS = [
  11. 'django.contrib.admin',
  12. 'django.contrib.auth',
  13. 'django.contrib.contenttypes',
  14. 'django.contrib.sessions',
  15. 'django.contrib.messages',
  16. 'django.contrib.staticfiles',
  17. 'gauth.apps.GauthConfig',
  18. 'review.apps.ReviewConfig',
  19. 'dashboard.apps.DashboardConfig',
  20. ]
  21. MIDDLEWARE = [
  22. 'django.middleware.security.SecurityMiddleware',
  23. 'django.contrib.sessions.middleware.SessionMiddleware',
  24. 'django.middleware.common.CommonMiddleware',
  25. 'django.middleware.csrf.CsrfViewMiddleware',
  26. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  27. 'django.contrib.messages.middleware.MessageMiddleware',
  28. 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  29. ]
  30. ROOT_URLCONF = 'review_automation.urls'
  31. TEMPLATES = [
  32. {
  33. 'BACKEND': 'django.template.backends.django.DjangoTemplates',
  34. 'DIRS': [],
  35. 'APP_DIRS': True,
  36. 'OPTIONS': {
  37. 'context_processors': [
  38. 'django.template.context_processors.debug',
  39. 'django.template.context_processors.request',
  40. 'django.contrib.auth.context_processors.auth',
  41. 'django.contrib.messages.context_processors.messages',
  42. ],
  43. },
  44. },
  45. ]
  46. WSGI_APPLICATION = 'review_automation.wsgi.application'
  47. # Database
  48. DATABASES = {
  49. 'default': {
  50. 'ENGINE': 'django.db.backends.mysql',
  51. 'NAME': 'review_automation',
  52. 'USER': 'root',
  53. 'PASSWORD': 'sad2002S1',
  54. 'HOST': 'localhost',
  55. 'PORT': '3306',
  56. }
  57. }
  58. # Password validation
  59. AUTH_PASSWORD_VALIDATORS = [
  60. {
  61. 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
  62. },
  63. {
  64. 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
  65. },
  66. {
  67. 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
  68. },
  69. {
  70. 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
  71. },
  72. ]
  73. # Internationalization
  74. LANGUAGE_CODE = 'en-us'
  75. TIME_ZONE = 'UTC'
  76. USE_I18N = True
  77. USE_L10N = True
  78. USE_TZ = True
  79. # Static files (CSS, JavaScript, Images)
  80. STATIC_URL = '/static/'
  81. LOGIN_URL = '/admin/login'
  82. LOGIN_REDIRECT_URL = '/'
  83. # Google credentials
  84. CLIENT_ID = "174657415928-0bt50gt42pslq47gf21ao67n15rom96r.apps.googleusercontent.com"
  85. CLIENT_SECRET = "ZXYpt07Su0pW3y3jPGOXY_C_"
  86. TOKEN_URI = "https://oauth2.googleapis.com/token"
  87. HOST_URI = "http://127.0.0.1:8000"