settings.py 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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. 'crispy_forms',
  21. ]
  22. MIDDLEWARE = [
  23. 'django.middleware.security.SecurityMiddleware',
  24. 'django.contrib.sessions.middleware.SessionMiddleware',
  25. 'django.middleware.common.CommonMiddleware',
  26. 'django.middleware.csrf.CsrfViewMiddleware',
  27. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  28. 'django.contrib.messages.middleware.MessageMiddleware',
  29. 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  30. ]
  31. ROOT_URLCONF = 'review_automation.urls'
  32. TEMPLATES = [
  33. {
  34. 'BACKEND': 'django.template.backends.django.DjangoTemplates',
  35. 'DIRS': [],
  36. 'APP_DIRS': True,
  37. 'OPTIONS': {
  38. 'context_processors': [
  39. 'django.template.context_processors.debug',
  40. 'django.template.context_processors.request',
  41. 'django.contrib.auth.context_processors.auth',
  42. 'django.contrib.messages.context_processors.messages',
  43. ],
  44. },
  45. },
  46. ]
  47. WSGI_APPLICATION = 'review_automation.wsgi.application'
  48. # Database
  49. DATABASES = {
  50. 'default': {
  51. 'ENGINE': 'django.db.backends.mysql',
  52. 'NAME': 'review_automation',
  53. 'USER': 'root',
  54. 'PASSWORD': 'sad2002S1',
  55. 'HOST': 'localhost',
  56. 'PORT': '3306',
  57. }
  58. }
  59. # Password validation
  60. AUTH_PASSWORD_VALIDATORS = [
  61. {
  62. 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
  63. },
  64. {
  65. 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
  66. },
  67. {
  68. 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
  69. },
  70. {
  71. 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
  72. },
  73. ]
  74. # Internationalization
  75. LANGUAGE_CODE = 'en-us'
  76. TIME_ZONE = 'UTC'
  77. USE_I18N = True
  78. USE_L10N = True
  79. USE_TZ = True
  80. # Static files (CSS, JavaScript, Images)
  81. STATIC_URL = '/static/'
  82. LOGIN_URL = '/admin/login'
  83. LOGIN_REDIRECT_URL = '/'
  84. CRISPY_TEMPLATE_PACK = 'bootstrap4'
  85. # Google credentials
  86. CLIENT_ID = "174657415928-0bt50gt42pslq47gf21ao67n15rom96r.apps.googleusercontent.com"
  87. CLIENT_SECRET = "ZXYpt07Su0pW3y3jPGOXY_C_"
  88. TOKEN_URI = "https://oauth2.googleapis.com/token"
  89. HOST_URI = "http://127.0.0.1:8000"