Update for django 1.4
authorMagnus Hagander <magnus@hagander.net>
Sat, 25 May 2013 19:02:57 +0000 (15:02 -0400)
committerMagnus Hagander <magnus@hagander.net>
Sat, 25 May 2013 19:02:57 +0000 (15:02 -0400)
hamnadmin/settings.py

index 8dd515083667fc0225c22601c04e5869c44ca6d4..e4a806eab99792e5b9aa160877d371ab885f9a7d 100644 (file)
@@ -8,12 +8,13 @@ ADMINS = (
 
 MANAGERS = ADMINS
 
-DATABASE_ENGINE = 'postgresql_psycopg2'           # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
-DATABASE_NAME = 'planetbeta'             # Or path to database file if using sqlite3.
-DATABASE_USER = 'admin'             # Not used with sqlite3.
-DATABASE_PASSWORD = ''         # Not used with sqlite3.
-DATABASE_HOST = '/tmp'             # Set to empty string for localhost. Not used with sqlite3.
-DATABASE_PORT = ''             # Set to empty string for default. Not used with sqlite3.
+DATABASES={
+       'default': {
+               'ENGINE': 'django.db.backends.postgresql_psycopg2',
+               'NAME': 'planetbeta',
+               'USER': 'admin',
+               }
+       }
 
 TIME_ZONE = 'GMT'
 LANGUAGE_CODE = 'en-us'
@@ -24,19 +25,20 @@ USE_I18N = False
 
 MEDIA_ROOT = ''
 MEDIA_URL = ''
-ADMIN_MEDIA_PREFIX = '/media/'
+STATIC_URL = '/media/'
 
 SECRET_KEY = '_q-piuw^kw^v1f%b6nrla+p%=&1bt#z%c$ujhioxe^!z%8q1l0'
 
 # List of callables that know how to import templates from various sources.
 TEMPLATE_LOADERS = (
-    'django.template.loaders.filesystem.load_template_source',
-    'django.template.loaders.app_directories.load_template_source',
+    'django.template.loaders.filesystem.Loader',
+    'django.template.loaders.app_directories.Loader',
 )
 
 MIDDLEWARE_CLASSES = (
     'django.middleware.common.CommonMiddleware',
     'django.contrib.sessions.middleware.SessionMiddleware',
+    'django.contrib.messages.middleware.MessageMiddleware',
     'django.contrib.auth.middleware.AuthenticationMiddleware',
     'hamnadmin.exceptions.PlanetExceptionMiddleware',
 )
@@ -53,6 +55,7 @@ INSTALLED_APPS = (
     'django.contrib.contenttypes',
     'django.contrib.sessions',
     'django.contrib.sites',
+       'django.contrib.staticfiles',
     'hamnadmin.register',
     'django.contrib.admin',
 )