diff options
Diffstat (limited to 'settings.py')
-rw-r--r-- | settings.py | 53 |
1 files changed, 46 insertions, 7 deletions
diff --git a/settings.py b/settings.py index 7dfe7195..25b2e09e 100644 --- a/settings.py +++ b/settings.py @@ -49,9 +49,6 @@ AUTH_PROFILE_MODULE = 'devel.UserProfile' 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.static', 'django.contrib.messages.context_processors.messages', 'main.context_processors.secure', 'main.context_processors.branding', @@ -69,18 +66,17 @@ TEMPLATE_LOADERS = ( 'django.template.loaders.app_directories.Loader', ) -# This bug is a real bummer: -# http://code.djangoproject.com/ticket/14105 MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.http.ConditionalGetMiddleware', - 'django.middleware.doc.XViewMiddleware', ) +# Base of the URL hierarchy ROOT_URLCONF = 'urls' # URL to serve static files @@ -94,6 +90,9 @@ STATICFILES_DIRS = ( os.path.join(DEPLOY_PATH, 'sitestatic'), ) +# Static files backend that allows us to use far future Expires headers +STATICFILES_STORAGE = 'main.storage.MinifiedStaticFilesStorage' + # Configure where messages should reside MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage' @@ -101,6 +100,9 @@ MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage' SESSION_ENGINE = 'django.contrib.sessions.backends.cached_db' SESSION_COOKIE_HTTPONLY = True +# Clickjacking protection +X_FRAME_OPTIONS = 'DENY' + INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', @@ -109,7 +111,6 @@ INSTALLED_APPS = ( 'django.contrib.sites', 'django.contrib.sitemaps', 'django.contrib.admin', - 'django.contrib.markup', 'django.contrib.staticfiles', 'south', 'django_countries', @@ -126,6 +127,31 @@ INSTALLED_APPS = ( 'retro', ) +# Logging configuration for not getting overspammed +LOGGING = { + 'version': 1, + 'filters': { + 'ratelimit': { + '()': 'main.log.RateLimitFilter', + } + }, + 'handlers': { + 'mail_admins': { + 'level': 'ERROR', + 'filters': ['ratelimit'], + 'class': 'django.utils.log.AdminEmailHandler', + } + }, + 'loggers': { + 'django.request': { + 'handlers': ['mail_admins'], + 'level': 'ERROR', + 'propagate': True, + }, + }, +} + + ## Server used for linking to PGP keysearch results PGP_SERVER = 'pgp.mit.edu:11371' @@ -139,10 +165,23 @@ PXEBOOT_URL = 'http://repo.parabolagnulinux.org/pxeboot/' # community bit on the end, repo.svn_root is appended) #SVN_BASE_URL = 'svn://svn.archlinux.org/' +# URL for linking to mailing lists MAILMAN_BASE_URL = 'https://lists.parabolagnulinux.org/' + +# URL for linking to the bugtracker BUGTRACKER_URL = 'https://labs.parabola.nu/' + +# URL for linking to the release engineering/iso project on the bugtracker BUGTRACKER_RELENG_URL = 'https://labs.parabola.nu/projects/isos' +# Trackers used for ISO download magnet links +TORRENT_TRACKERS = ( + 'udp://tracker.archlinux.org:6969', + 'http://tracker.archlinux.org:6969/announce', +) + +DOMAIN_RE = r'^(.+\.)?parabolagnulinux.org$' + BRANDING_APPNAME = 'parabolaweb' BRANDING_DISTRONAME = 'Parabola GNU/Linux-libre' BRANDING_SHORTNAME = 'Parabola' |