Commit 91c4cae1e9e04d612d6f3555b32a744cc913794e

Authored by Carlos Coêlho
1 parent 05aa61b1

Fixed settings duplicates

Removed duplicated variables and applied some PEP8 enhancements

Signed-off-by: Carlos Oliveira <carlospecter@gmail.com>
Signed-off-by: Alexandre Barbosa <alexandreab@live.com>
Showing 1 changed file with 5 additions and 19 deletions   Show diff stats
colab/settings.py
@@ -28,8 +28,6 @@ TEMPLATE_DEBUG = True @@ -28,8 +28,6 @@ TEMPLATE_DEBUG = True
28 28
29 ALLOWED_HOSTS = [] 29 ALLOWED_HOSTS = []
30 30
31 -DATABASE_ROUTERS = []  
32 -  
33 # Application definition 31 # Application definition
34 32
35 INSTALLED_APPS = ( 33 INSTALLED_APPS = (
@@ -70,16 +68,6 @@ INSTALLED_APPS = ( @@ -70,16 +68,6 @@ INSTALLED_APPS = (
70 'common', 68 'common',
71 ) 69 )
72 70
73 -MIDDLEWARE_CLASSES = (  
74 - 'django.contrib.sessions.middleware.SessionMiddleware',  
75 - 'django.middleware.common.CommonMiddleware',  
76 - 'django.middleware.csrf.CsrfViewMiddleware',  
77 - 'django.contrib.auth.middleware.AuthenticationMiddleware',  
78 - 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',  
79 - 'django.contrib.messages.middleware.MessageMiddleware',  
80 - 'django.middleware.clickjacking.XFrameOptionsMiddleware',  
81 -)  
82 -  
83 ROOT_URLCONF = 'colab.urls' 71 ROOT_URLCONF = 'colab.urls'
84 72
85 WSGI_APPLICATION = 'colab.wsgi.application' 73 WSGI_APPLICATION = 'colab.wsgi.application'
@@ -87,8 +75,6 @@ WSGI_APPLICATION = &#39;colab.wsgi.application&#39; @@ -87,8 +75,6 @@ WSGI_APPLICATION = &#39;colab.wsgi.application&#39;
87 # Internationalization 75 # Internationalization
88 # https://docs.djangoproject.com/en/1.7/topics/i18n/ 76 # https://docs.djangoproject.com/en/1.7/topics/i18n/
89 77
90 -LANGUAGE_CODE = 'en-us'  
91 -  
92 TIME_ZONE = 'UTC' 78 TIME_ZONE = 'UTC'
93 79
94 USE_I18N = True 80 USE_I18N = True
@@ -200,7 +186,6 @@ CACHES = { @@ -200,7 +186,6 @@ CACHES = {
200 186
201 DATABASE_ROUTERS = [] 187 DATABASE_ROUTERS = []
202 188
203 -  
204 TEMPLATE_CONTEXT_PROCESSORS = ( 189 TEMPLATE_CONTEXT_PROCESSORS = (
205 'django.contrib.auth.context_processors.auth', 190 'django.contrib.auth.context_processors.auth',
206 'django.core.context_processors.debug', 191 'django.core.context_processors.debug',
@@ -222,6 +207,7 @@ MIDDLEWARE_CLASSES = ( @@ -222,6 +207,7 @@ MIDDLEWARE_CLASSES = (
222 'django.middleware.common.CommonMiddleware', 207 'django.middleware.common.CommonMiddleware',
223 'django.middleware.csrf.CsrfViewMiddleware', 208 'django.middleware.csrf.CsrfViewMiddleware',
224 'django.contrib.auth.middleware.AuthenticationMiddleware', 209 'django.contrib.auth.middleware.AuthenticationMiddleware',
  210 + 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
225 'django.contrib.messages.middleware.MessageMiddleware', 211 'django.contrib.messages.middleware.MessageMiddleware',
226 'django.middleware.clickjacking.XFrameOptionsMiddleware', 212 'django.middleware.clickjacking.XFrameOptionsMiddleware',
227 'django_mobile.middleware.MobileDetectionMiddleware', 213 'django_mobile.middleware.MobileDetectionMiddleware',
@@ -257,16 +243,16 @@ MESSAGE_TAGS = { @@ -257,16 +243,16 @@ MESSAGE_TAGS = {
257 messages.ERROR: 'alert-danger', 243 messages.ERROR: 'alert-danger',
258 } 244 }
259 245
260 -### Feedzilla (planet) 246 +# Feedzilla (planet)
261 from feedzilla.settings import * 247 from feedzilla.settings import *
262 FEEDZILLA_PAGE_SIZE = 5 248 FEEDZILLA_PAGE_SIZE = 5
263 FEEDZILLA_SITE_TITLE = _(u'Planet Colab') 249 FEEDZILLA_SITE_TITLE = _(u'Planet Colab')
264 FEEDZILLA_SITE_DESCRIPTION = _(u'Colab blog aggregator') 250 FEEDZILLA_SITE_DESCRIPTION = _(u'Colab blog aggregator')
265 251
266 -### Mailman API settings 252 +# Mailman API settings
267 MAILMAN_API_URL = 'http://localhost:9000' 253 MAILMAN_API_URL = 'http://localhost:9000'
268 254
269 -### BrowserID / Persona 255 +# BrowserID / Persona
270 SITE_URL = 'http://localhost:8000' 256 SITE_URL = 'http://localhost:8000'
271 BROWSERID_AUDIENCES = [SITE_URL, SITE_URL.replace('https', 'http')] 257 BROWSERID_AUDIENCES = [SITE_URL, SITE_URL.replace('https', 'http')]
272 258
@@ -279,7 +265,7 @@ BROWSERID_CREATE_USER = False @@ -279,7 +265,7 @@ BROWSERID_CREATE_USER = False
279 265
280 REVPROXY_ADD_REMOTE_USER = True 266 REVPROXY_ADD_REMOTE_USER = True
281 267
282 -## Converse.js settings 268 +# Converse.js settings
283 # This URL must use SSL in order to keep chat sessions secure 269 # This URL must use SSL in order to keep chat sessions secure
284 CONVERSEJS_BOSH_SERVICE_URL = SITE_URL + '/http-bind' 270 CONVERSEJS_BOSH_SERVICE_URL = SITE_URL + '/http-bind'
285 271