Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated some settings for the new server.

  • Loading branch information...
commit 0e6e0419f931f38c9e62e9e16fc4988861d5edea 1 parent f4cd879
Jacob Kaplan-Moss jacobian authored
Showing with 30 additions and 24 deletions.
  1. +30 −24 django_website/settings/www.py
54 django_website/settings/www.py
View
@@ -1,5 +1,6 @@
# Settings for www.djangoproject.com
+import os
import platform
from unipath import FSPath as Path
@@ -7,37 +8,40 @@
BASE = Path(__file__).absolute().ancestor(2)
# Far too clever trick to know if we're running on the deployment server.
-DEVELOPMENT_MODE = (platform.node() != "djangoproject")
+PRODUCTION = ('DJANGOPROJECT_DEBUG' not in os.environ) and ("djangoproject" in platform.node())
-ADMINS = (('Adrian Holovaty','holovaty@gmail.com'), ('Jacob Kaplan-Moss', 'jacob@jacobian.org'))
+ADMINS = (('Adrian Holovaty','holovaty@gmail.com'),('Jacob Kaplan-Moss', 'jacob@jacobian.org'))
+MANAGERS = (('Jacob Kaplan-Moss','jacob@jacobian.org'),)
TIME_ZONE = 'America/Chicago'
-
SERVER_EMAIL = 'root@djangoproject.com'
-MANAGERS = (('Jacob Kaplan-Moss','jacob@jacobian.org'),)
-DATABASE_ENGINE = 'postgresql_psycopg2'
-DATABASE_NAME = 'djangoproject'
+DATABASES = {
+ 'default': {
+ 'ENGINE': 'django.db.backends.postgresql_psycopg2',
+ 'NAME': 'djangoproject',
+ 'USER': 'djangoproject'
+ }
+}
+
+USE_I18N = False
+USE_L10N = False
+
TEMPLATE_DIRS = [BASE.child('templates')]
+MEDIA_ROOT = BASE.parent.child('media')
-if DEVELOPMENT_MODE:
+if PRODUCTION:
+ DEBUG = False
+ PREPEND_WWW = True
+ CACHE_BACKEND = 'memcached://127.0.0.1:11211/'
+ MEDIA_URL = "http://www.djangoproject.com.com/m/"
+ ADMIN_MEDIA_PREFIX = "http://www.djangoproject.com.com/m/admin/"
+else:
DEBUG = True
PREPEND_WWW = False
CACHE_BACKEND = "dummy:///"
- DJANGO_SVN_ROOT = "http://code.djangoproject.com/svn/django/"
- MEDIA_ROOT = BASE.parent.child('media')
MEDIA_URL = "/media/"
ADMIN_MEDIA_PREFIX = '/admin_media/'
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
-else:
- DEBUG = False
- PREPEND_WWW = True
- DATABASE_USER = 'apache'
- CACHE_BACKEND = 'memcached://127.0.0.1:11211/'
- TEMPLATE_DIRS = ['/home/djangoproject.com/django_website/templates']
- DJANGO_SVN_ROOT = "file:///home/svn/django/django/"
- MEDIA_ROOT = "/home/html/djangoproject.com/m/"
- MEDIA_URL = "http://www.djangoproject.com.com/m/"
- ADMIN_MEDIA_PREFIX = 'http://media.djangoproject.com/admin/'
SITE_ID = 1
ROOT_URLCONF = 'django_website.urls.www'
@@ -58,10 +62,6 @@
'registration',
)
-# setting for documentation root path
-DJANGO_DOCUMENT_ROOT_PATH = "/home/html/djangoproject.com/docs/"
-DJANGO_TESTS_PATH = "/home/html/djangoproject.com/tests/"
-
CACHE_MIDDLEWARE_SECONDS = 60 * 5 # 5 minutes
CACHE_MIDDLEWARE_KEY_PREFIX = 'djangoproject'
CACHE_MIDDLEWARE_GZIP = True
@@ -87,7 +87,6 @@
"django.core.context_processors.media",
]
-USE_I18N = False
DEFAULT_FROM_EMAIL = "noreply@djangoproject.com"
@@ -96,3 +95,10 @@
# comment_utils settings
AKISMET_API_KEY = "c892e4962244"
+
+# setting for documentation root path
+DJANGO_DOCUMENT_ROOT_PATH = "/home/html/djangoproject.com/docs/"
+DJANGO_TESTS_PATH = "/home/html/djangoproject.com/tests/"
+
+# XXX What's this for?
+DJANGO_SVN_ROOT = "http://code.djangoproject.com/svn/django/"
Please sign in to comment.
Something went wrong with that request. Please try again.