I want to deploy tomorrow. The problem is that django post office logs INTERNAL Errors into the the table "postoffice_emails". I do not know why. It is about some broken links. I guess I can fix the links, but still I do not want to spam my database with that sort of reporting.
DEBUG = False
TEMPLATE_DEBUG = False
ALLOWED_HOSTS = ['*']
SITE_ID = 1
# Application definition
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.admindocs',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.sites',
'floppyforms',
'crispy_forms',
'home',
'apps.application',
'braces',
'post_office',
'model_utils',
)
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.middleware.clickjacking.XFrameOptionsMiddleware',
)
ROOT_URLCONF = 'netteachers.urls'
WSGI_APPLICATION = 'netteachers.wsgi.application'
# Internationalization
LANGUAGE_CODE = 'de_DE'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'htdocs', 'static')
# Additional locations of static files
STATICFILES_DIRS = (
# Put strings here, like "/home/html/static" or "C:/www/django/static".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
os.path.join(BASE_DIR, 'static'),
)
# List of finder classes that know how to find static files in
# various locations.
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
)
TEMPLATE_DIRS = (
os.path.join(BASE_DIR, 'templates'),
)
CRISPY_TEMPLATE_PACK = 'bootstrap3'
TEMPLATE_CONTEXT_PROCESSORS = (
"django.contrib.auth.context_processors.auth",
"django.core.context_processors.debug",
"django.core.context_processors.i18n",
"django.core.context_processors.media",
'django.core.context_processors.request',
"django.contrib.messages.context_processors.messages",
"core.context_processors.resolvermatch",
)
#post office settings
EMAIL_BACKEND = 'post_office.EmailBackend'
# Put this in settings.py
POST_OFFICE = {
'DEFAULT_PRIORITY': 'now'
}
# Put this in settings.py
POST_OFFICE = {
'LOG_LEVEL': 1 # Log only failed deliveries
}
# Pyrox Email settinge
EMAIL_PORT = 25
EMAIL_HOST_PASSWORD = 'coursera2014'
EMAIL_USE_TLS = True
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER
SERVER_EMAIL = EMAIL_HOST_USER
gettext = lambda x: x
LANGUAGES = (
('de', gettext('German')),
)