X-Git-Url: https://git.sommitrealweird.co.uk/sommitrealweird.git/blobdiff_plain/d82db041f520a51eccee6788ebc3a494e2a4280f..4ad54bc9a9429a2c5c288192c663f75ae1e7aad9:/sommitrealweird/settings.py?ds=inline diff --git a/sommitrealweird/settings.py b/sommitrealweird/settings.py index e4d2dcc..70594da 100644 --- a/sommitrealweird/settings.py +++ b/sommitrealweird/settings.py @@ -11,14 +11,19 @@ ADMINS = ( ('Brett Parker', 'iDunno@sommitrealweird.co.uk'), ) +ALLOWED_HOSTS = [ + "www.sommitrealweird.co.uk", + "www.sommitrealweird.co.uk.", +] + MANAGERS = ADMINS -DATABASE_ENGINE = 'sqlite3' -DATABASE_NAME = os.path.join(topdir, 'sommitrealweird.db') -DATABASE_USER = '' -DATABASE_PASSWORD = '' -DATABASE_HOST = '' -DATABASE_PORT = '' +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': os.path.join(topdir, 'sommitrealweird.db') + } +} TIME_ZONE = 'Europe/London' @@ -26,6 +31,8 @@ LANGUAGE_CODE = 'en-gb' SITE_ID = 1 +TEST_RUNNER = 'django.test.runner.DiscoverRunner' + # If you set this to False, Django will make some optimizations so as not # to load the internationalization machinery. USE_I18N = True @@ -33,32 +40,53 @@ USE_I18N = True MEDIA_ROOT = os.path.join(topdir, 'media') + os.sep MEDIA_URL = '/media/' -ADMIN_MEDIA_PREFIX = '/admin-media/' +STATIC_URL = '/static/' import random import string key_chars = "%s%s%s" % (string.letters, string.digits, '+-()_#~') SECRET_KEY = [random.choice(key_chars) for a in range(0,50)] -CACHE_BACKEND = 'file://%s/tmp' %(topdir) - -TEMPLATE_LOADERS = ( - 'django.template.loaders.filesystem.load_template_source', - 'django.template.loaders.app_directories.load_template_source', -) +CACHES = { + 'default': { + 'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache', + 'LOCATION': '%s/tmp' %(topdir), + } +} MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', - 'django.middleware.doc.XViewMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.admindocs.middleware.XViewMiddleware', ) ROOT_URLCONF = 'urls' -TEMPLATE_DIRS = ( - os.path.join(topdir, 'templates'), -) +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [os.path.join(topdir, 'templates'),], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.contrib.auth.context_processors.auth', + 'django.template.context_processors.debug', + 'django.template.context_processors.i18n', + 'django.template.context_processors.media', + 'bpcms.context_processors.content_menu', + 'bpcms.context_processors.content_submenu', + 'bpcms.context_processors.content_breadcrumb', + 'blog.context_processors.content_breadcrumb', + 'blog.context_processors.blog_feed', + 'photo.context_processors.content_breadcrumb', + ], + 'debug': True, + }, + }, +] INSTALLED_APPS = ( 'django.contrib.auth', @@ -66,29 +94,18 @@ INSTALLED_APPS = ( 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.admin', - 'django.contrib.markup', 'bpcms', 'generic', 'blog', 'photo', ) -TEMPLATE_CONTEXT_PROCESSORS = ( - 'django.core.context_processors.auth', - 'django.core.context_processors.debug', - 'django.core.context_processors.i18n', - 'generic.context_processors.media', - 'bpcms.context_processors.content_menu', - 'bpcms.context_processors.content_submenu', - 'bpcms.context_processors.content_breadcrumb', - 'blog.context_processors.content_breadcrumb', - 'photo.context_processors.content_breadcrumb', -) APPEND_SLASH=False RESTRUCTUREDTEXT_FILTER_SETTINGS = { 'initial_header_level': 2, + 'doctitle_xform': False, } BPCMS_ROOT = '/' @@ -100,6 +117,7 @@ BPCMS_DISALLOWED_ROOT_DOC_NAMES = ( BLOG_ROOT = '/blog/' BLOG_TITLE = u'The World of SommitRealWeird.' +BLOG_FEED_ROOT = '/feeds/blog/' try: from localsettings import *