summaryrefslogtreecommitdiff
path: root/settings.py
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-04-21 02:22:44 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-04-21 02:22:44 -0400
commit03fa7e4f27bdb39a8f8f5ed91a87d18bf8357b47 (patch)
treec67eafcbda55706f18400b3115a2b8a5be318394 /settings.py
parent91c451821ce7000cbc268cec8427d208a6cedd7e (diff)
parentb8ee7b1ee281b45b245fb454228b8ad847c56200 (diff)
Merge branch 'archweb' into archweb-generic2
Conflicts: devel/views.py feeds.py public/views.py settings.py sitestatic/archweb.js templates/base.html templates/devel/profile.html templates/mirrors/status.html templates/news/view.html templates/packages/flaghelp.html templates/packages/opensearch.xml templates/public/download.html templates/public/feeds.html templates/public/index.html templates/registration/login.html templates/releng/results.html templates/todolists/public_list.html
Diffstat (limited to 'settings.py')
-rw-r--r--settings.py54
1 files changed, 44 insertions, 10 deletions
diff --git a/settings.py b/settings.py
index 8cde6342..49ef1898 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,29 +127,62 @@ 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'
# URL to fetch a current list of available ISOs
-ISO_LIST_URL = 'http://releng.archlinux.org/isos/'
+ISO_LIST_URL = 'https://releng.archlinux.org/isos/'
# URL to the PXE netboot instructions
-PXEBOOT_URL = 'http://releng.archlinux.org/pxeboot/'
+PXEBOOT_URL = 'https://releng.archlinux.org/pxeboot/'
# URL for SVN access for fetching commit messages (note absence of packages or
# 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://mailman.archlinux.org/'
+
+# URL for linking to the bugtracker
BUGTRACKER_URL = 'https://bugs.archlinux.org/'
+# Trackers used for ISO download magnet links
+TORRENT_TRACKERS = (
+ 'udp://tracker.archlinux.org:6969',
+ 'http://tracker.archlinux.org:6969/announce',
+)
+
BRANDING_APPNAME = 'archweb'
BRANDING_DISTRONAME = 'Arch Linux'
BRANDING_SHORTNAME = 'Arch'
BRANDING_WIKINAME = 'ArchWiki'
BRANDING_EMAIL = 'Arch Website Notification <nobody@archlinux.org>'
-
## Import local settings
from local_settings import *