Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions main/settings.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Django settings for main project.

Generated by 'django-admin startproject' using Django 3.0.1.
Generated by 'django-admin startproject' using Django 3.0.

For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
Expand All @@ -11,6 +11,7 @@
"""

import os
#import django_heroku
import dj_database_url

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
Expand All @@ -21,12 +22,14 @@
# See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '4g$9)iy_(%kvx)f$ty4%=^0vlqr61j1127f9p66^x57#hv(0%o'
SECRET_KEY = 'u*^vbignq_#caps9rl*kw-x9g^f73yzxa7+th)mi+gnojp!kr_'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = ['.herokuapp.com']
ALLOWED_HOSTS = ['.herokuapp.com',
'.pythonanywhere.com'
]


# Application definition
Expand All @@ -38,7 +41,9 @@
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.postgres',
'timetable',
#'useraccounts.apps.UseraccountsConfig'
]

MIDDLEWARE = [
Expand Down Expand Up @@ -79,7 +84,7 @@
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'TimeTable',
'NAME': 'RandomMatch',
'USER': 'postgres',
'PASSWORD': 'pratham123',
'HOST': 'localhost',
Expand Down Expand Up @@ -134,5 +139,13 @@
# Add configuration for static files storage using whitenoise
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'

EMAIL_BACKEND ='django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_USE_TLS = True
EMAIL_PORT = 587
EMAIL_HOST_USER = '[email protected]'
EMAIL_HOST_PASSWORD = 'pratham123'

prod_db = dj_database_url.config(conn_max_age=500)
DATABASES['default'].update(prod_db)
DATABASES['default'].update(prod_db)
#django_heroku.settings(locals())