ansible/roles/mailman/templates/hyperkitty.settings_local.py.j2
2013-09-05 16:46:18 +00:00

101 lines
3.1 KiB
Django/Jinja

#-*- coding: utf-8 -*-
"""
Django local settings for the hyperkitty project.
"""
DEBUG = False
TEMPLATE_DEBUG = DEBUG
ADMINS = ()
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'hyperkitty',
'USER': 'hyperkittyapp',
'PASSWORD': '{{ mailman_hk_db_pass }}',
'HOST': 'db02.stg.phx2.fedoraproject.org',
'PORT': '',
}
}
# URL prefix for static files.
# Example: "http://media.lawrence.com/static/"
STATIC_URL = '/hyperkitty/static/'
# Add Fedora to the authentication backends
AUTHENTICATION_BACKENDS = (
'social_auth.backends.browserid.BrowserIDBackend',
'hyperkitty.lib.fedora.FedoraBackend',
'social_auth.backends.google.GoogleBackend',
'social_auth.backends.yahoo.YahooBackend',
#'social_auth.backends.OpenIDBackend',
'django.contrib.auth.backends.ModelBackend',
)
# Use the email address as the username (add associate_by_email).
SOCIAL_AUTH_PIPELINE = (
'social_auth.backends.pipeline.social.social_auth_user',
'social_auth.backends.pipeline.associate.associate_by_email',
'social_auth.backends.pipeline.user.get_username',
'social_auth.backends.pipeline.user.create_user',
'social_auth.backends.pipeline.social.associate_user',
'social_auth.backends.pipeline.social.load_extra_data',
'social_auth.backends.pipeline.user.update_user_details'
)
# A sample logging configuration. The only tangible logging
# performed by this configuration is to send an email to
# the site admins on every HTTP 500 error.
# See http://docs.djangoproject.com/en/dev/topics/logging for
# more details on how to customize your logging configuration.
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'mail_admins': {
'level': 'ERROR',
'class': 'django.utils.log.AdminEmailHandler'
},
'file':{
'level': 'DEBUG',
#'class': 'logging.handlers.RotatingFileHandler',
'class': 'logging.FileHandler',
'filename': '/var/log/hyperkitty/hyperkitty.log',
'formatter': 'verbose',
},
},
'loggers': {
'django.request': {
'handlers': ['file'],
'level': 'ERROR',
'propagate': True,
},
'django': {
'handlers': ['file'],
'level': 'ERROR',
'propagate': True,
},
'hyperkitty': {
'handlers': ['file'],
'level': 'DEBUG',
'propagate': True,
},
},
'formatters': {
'verbose': {
'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'
},
'simple': {
'format': '%(levelname)s %(message)s'
},
},
}
# Make this unique, and don't share it with anybody.
SECRET_KEY = '{{ mailman_hk_cookie_key }}'
APP_NAME = 'Fedora list archives'
KITTYSTORE_URL = 'postgres://kittystoreapp:{{ mailman_ks_db_pass }}@db02.stg.phx2.fedoraproject.org/kittystore'
KITTYSTORE_SEARCH_INDEX = '/var/lib/hyperkitty/sites/default/kittystore_search_index'
KITTYSTORE_DEBUG = False
USE_MOCKUPS = False