]> git.sommitrealweird.co.uk Git - sommitrealweird.git/commitdiff
Upgrade settings for django 1.4
authorBrett Parker <iDunno@sommitrealweird.co.uk>
Sat, 27 Apr 2013 23:15:38 +0000 (00:15 +0100)
committerBrett Parker <iDunno@sommitrealweird.co.uk>
Sat, 27 Apr 2013 23:15:38 +0000 (00:15 +0100)
sommitrealweird/blog/feeds.py
sommitrealweird/settings.py
sommitrealweird/urls.py

index 064f22a5c4671c2b8e63730c28a1e6a9b39f21d0..991d2f0c7271dd3fa3893b798e76357bad144705 100644 (file)
@@ -1,4 +1,4 @@
-from django.contrib.syndication.feeds import Feed
+from django.contrib.syndication.views import Feed
 from django.utils.feedgenerator import Atom1Feed
 from blog.models import BlogEntry
 from django.conf import settings
 from django.utils.feedgenerator import Atom1Feed
 from blog.models import BlogEntry
 from django.conf import settings
index 41f9656cc9c13e3b8376b7db0efbfb0b75a73de6..95ead0af9503abad2d07062952eb71ac66b1076c 100644 (file)
@@ -13,12 +13,12 @@ ADMINS = (
 
 MANAGERS = ADMINS
 
 
 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'
 
 
 TIME_ZONE = 'Europe/London'
 
@@ -33,24 +33,30 @@ USE_I18N = True
 MEDIA_ROOT = os.path.join(topdir, 'media') + os.sep
 MEDIA_URL = '/media/'
 
 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)]
 
 
 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)
+CACHES = {
+    'default': {
+        'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
+         'LOCATION': '%s/tmp' %(topdir),
+    }
+}
 
 TEMPLATE_LOADERS = (
 
 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.auth.middleware.AuthenticationMiddleware',
 )
 
 MIDDLEWARE_CLASSES = (
     'django.middleware.common.CommonMiddleware',
     'django.contrib.sessions.middleware.SessionMiddleware',
     'django.contrib.auth.middleware.AuthenticationMiddleware',
+    'django.contrib.messages.middleware.MessageMiddleware',
     'django.middleware.csrf.CsrfViewMiddleware',
     'django.middleware.doc.XViewMiddleware',
 )
     'django.middleware.csrf.CsrfViewMiddleware',
     'django.middleware.doc.XViewMiddleware',
 )
@@ -76,7 +82,7 @@ INSTALLED_APPS = (
 )
 
 TEMPLATE_CONTEXT_PROCESSORS = (
 )
 
 TEMPLATE_CONTEXT_PROCESSORS = (
-    'django.core.context_processors.auth',
+    'django.contrib.auth.context_processors.auth',
     'django.core.context_processors.debug',
     'django.core.context_processors.i18n',
     'generic.context_processors.media',
     'django.core.context_processors.debug',
     'django.core.context_processors.i18n',
     'generic.context_processors.media',
index 6450746a057fdff162885f3382f7d8d24ce95b54..2aaf73df89820e2b37a9a5ed59d1586c7dde3961 100644 (file)
@@ -27,8 +27,8 @@ urlpatterns = patterns('',
     (r'^photo/', include('photo.urls')),
     (r'^photos/', include('photo.urls')),
     (r'^css-doc/(?P<slug>.*)$', 'bpcms.views.css_view'),
     (r'^photo/', include('photo.urls')),
     (r'^photos/', include('photo.urls')),
     (r'^css-doc/(?P<slug>.*)$', 'bpcms.views.css_view'),
-    (r'^feeds/rss/(?P<url>.*)/', 'django.contrib.syndication.views.feed', {'feed_dict': rssfeeds_dict}),
-    (r'^feeds/(?P<url>.*)/', 'django.contrib.syndication.views.feed', {'feed_dict': feeds_dict}),
+    (r'^feeds/rss/blog/', LatestBlogEntriesRss()),
+    (r'^feeds/blog/', LatestBlogEntries()),
     (r'^comments/', include('django.contrib.comments.urls')),
     (r'^(?:content/|)', include('bpcms.urls'))
 )
     (r'^comments/', include('django.contrib.comments.urls')),
     (r'^(?:content/|)', include('bpcms.urls'))
 )