I am really novice with Django, and I am having troubles in configuring my app to send me emails with the bug reports.
I already set on the settings file the required variables as I saw on the Django documentation, like this:
DEBUG = False
...
ADMINS = [('myname', 'myemail@server')] # For server errors
MANAGERS = [('myname', 'myemail@server')] # For missing pages errors
I provoked a error for testing, but nothing happened, no email. What should I do?
This is the code of the settings file (without sensitive data, of course):
"""
Django settings for genform project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
SECRET_KEY = '****************************************'
DEBUG = False
ALLOWED_HOSTS = []
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'widget_tweaks',
'generador',
'menu',
'parametros_transformados',
'seguridad',
'tablas_de_no_parametros',
'reportes',
'logger',
'parametros',
'django_openid_auth'
)
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
# 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.security.SecurityMiddleware',
)
AUTHENTICATION_BACKENDS = (
'django_openid_auth.auth.OpenIDBackend',
'django.contrib.auth.backends.ModelBackend',
)
TEMPLATES = [
{
'BACKEND':'django.template.backends.django.DjangoTemplates',
'DIRS':[os.path.join(os.path.dirname(__file__), '../templates')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
OPENID_UPDATE_DETAILS_FROM_SREG = True
ROOT_URLCONF = 'genform.urls'
WSGI_APPLICATION = 'genform.wsgi.application'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': '*****',
'USER': '******',
'PASSWORD': '******',
'HOST': '***********',
'PORT': '***',
}
}
STATICFILES_DIRS = (
#os.path.dirname(__file__)+"static",
# Put strings here, like "/home/html/site_media" or "C:/www/django/site_media".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
os.path.join(os.path.dirname(__file__), '../static'),
)
AUTH_PROFILE_MODULE = 'seguridad.c_perfil_usuario'
LOGIN_REDIRECT_URL = '/index'
OPENID_SSO_SERVER_URL = '***********'
OPENID_CREATE_USERS = True
LANGUAGE_CODE = 'es-es'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
STATIC_URL = '/static/'
ADMINS = [('MyName', 'myemail@server')]
MANAGERS = [('MyName', 'myemail@server')]