From 4c424e9fc277558725f3257f9e334d1ac0c73e08 Mon Sep 17 00:00:00 2001 From: Macartur Sousa Date: Fri, 4 Sep 2015 12:22:56 -0300 Subject: [PATCH] Review files using flake8 --- src/colab_spb/middleware.py | 6 ++++-- tests/colab_settings.py | 14 +++++++------- tests/runtests.py | 1 + 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/colab_spb/middleware.py b/src/colab_spb/middleware.py index 28f841f..9006cbb 100644 --- a/src/colab_spb/middleware.py +++ b/src/colab_spb/middleware.py @@ -1,9 +1,11 @@ from django.conf import settings from django.utils import translation + class ForceLangMiddleware: - def process_request(self,request): - request.LANG = getattr(settings,'LANGUAGE_CODE',settings.LANGUAGE_CODE) + def process_request(self, request): + request.LANG = getattr(settings, 'LANGUAGE_CODE', + settings.LANGUAGE_CODE) translation.activate(request.LANG) request.LANGUAGE_CODE = request.LANG diff --git a/tests/colab_settings.py b/tests/colab_settings.py index bf1efa5..10e5533 100644 --- a/tests/colab_settings.py +++ b/tests/colab_settings.py @@ -1,9 +1,9 @@ -## Set to false in production +# Set to false in production DEBUG = True TEMPLATE_DEBUG = False -## System admins +# System admins ADMINS = [['John Foo', 'john@example.com'], ['Mary Bar', 'mary@example.com']] MANAGERS = ADMINS @@ -19,15 +19,15 @@ SECRET_KEY = 'not-a-secret' ALLOWED_HOSTS = [ 'localhost', -# 'example.com', -# 'example.org', -# 'example.net', + # 'example.com', + # 'example.org', + # 'example.net', ] -### Uncomment to enable social networks fields profile +# Uncomment to enable social networks fields profile SOCIAL_NETWORK_ENABLED = True -## Disable indexing +# Disable indexing ROBOTS_NOINDEX = True LOGGING = { diff --git a/tests/runtests.py b/tests/runtests.py index 613664f..ad6efad 100644 --- a/tests/runtests.py +++ b/tests/runtests.py @@ -6,6 +6,7 @@ import django from django.conf import settings from django.test.utils import get_runner + def run(): os.environ['DJANGO_SETTINGS_MODULE'] = 'colab.settings' os.environ['COLAB_PLUGINS'] = 'tests/plugins.d' -- libgit2 0.21.2