ACCOUNT_ACTIVATION_DAYS = 2 ###
AUTH_USER_EMAIL_UNIQUE = True ###
AUTH_USER_MODEL = 'account.User'
DATABASES = {'default': {'OPTIONS': {}, 'HOST': '', 'PORT': '', 'TEST_COLLATION'
: None, 'PASSWORD': '111', 'USER': '111', 'TEST_CHARSET': None, 'NAME': 'C:/User
s/007/portal/sqlite3.db', 'TEST_NAME': None, 'TEST_MIRROR': None, 'TIME_ZONE': '
UTC', 'ENGINE': 'django.db.backends.sqlite3'}}
DEBUG = True
DEFAULT_FROM_EMAIL = 'info@google.ru'
EMAIL_PORT = 1025
INSTALLED_APPS = ('django.contrib.auth', 'django.contrib.contenttypes', 'django.
contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.co
ntrib.staticfiles', 'django.contrib.admin', 'registration', 'news', 'job', 'acco
unt')
LOGGING = {'loggers': {'django.request': {'propagate': True, 'handlers': ['mail_
admins'], 'level': 'ERROR'}}, 'handlers': {'mail_admins': {'class': 'django.util
s.log.AdminEmailHandler', 'filters': ['require_debug_false'], 'level': 'ERROR'}}
, 'filters': {'require_debug_false': {'()': 'django.utils.log.RequireDebugFalse'
}}, 'version': 1, 'disable_existing_loggers': False}
ROOT_URLCONF = 'portal.urls' ###
SECRET_KEY = 'i5qwq-5%f_j(=uq6(y=((6t29)p214^mj)-5ba@l!)=j!gh%#-'
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
SETTINGS_MODULE = 'portal.settings' ###
SITE_ID = 1 ###
STATIC_URL = '/static/'
TEMPLATE_DEBUG = True
USE_L10N = True
USE_TZ = True
WSGI_APPLICATION = 'portal.wsgi.application
def create_user(self, email, username, password=None):
if not email:
raise ValueError('Users must have an email address')
user = self.model(
email=UserManager.normalize_email(email),
username=username)
user.set_password(password)
send_mail('Subject here', 'Here is the message.', 'first@yandex.ru', ['second@mail.ru'], fail_silently=False)
user.save(using=self._db)
return user
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = '******@gmail.com'
EMAIL_HOST_PASSWORD =*********'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
ConnectionRefusedError: [WinError 10061] Подключение не установлено, т.к. конечн
ый компьютер отверг запрос на подключение
def create_user(self, email, username, password=None):
if not email:
raise ValueError('Users must have an email address')
user = self.model(
email=UserManager.normalize_email(email),
username=username)
user.set_password(password)
send_mail('Subject here', 'Here is the message.', 'first@yandex.ru', ['second@mail.ru'], fail_silently=False)
user.save(using=self._db)
return user
ConnectionRefusedError: [WinError 10061] Подключение не установлено, т.к. конечн
ый компьютер отверг запрос на подключение