Commit 4c424e9fc277558725f3257f9e334d1ac0c73e08
1 parent
cab2b14d
Exists in
master
and in
79 other branches
Review files using flake8
Signed-off-by: Macartur Sousa <macartur.sc@gmail.com> Signed-off-by: Lucas Kanashiro <kanashiro.duarte@gmail.com>
Showing
3 changed files
with
12 additions
and
9 deletions
Show diff stats
src/colab_spb/middleware.py
| 1 | 1 | from django.conf import settings |
| 2 | 2 | from django.utils import translation |
| 3 | 3 | |
| 4 | + | |
| 4 | 5 | class ForceLangMiddleware: |
| 5 | 6 | |
| 6 | - def process_request(self,request): | |
| 7 | - request.LANG = getattr(settings,'LANGUAGE_CODE',settings.LANGUAGE_CODE) | |
| 7 | + def process_request(self, request): | |
| 8 | + request.LANG = getattr(settings, 'LANGUAGE_CODE', | |
| 9 | + settings.LANGUAGE_CODE) | |
| 8 | 10 | translation.activate(request.LANG) |
| 9 | 11 | request.LANGUAGE_CODE = request.LANG | ... | ... |
tests/colab_settings.py
| 1 | 1 | |
| 2 | -## Set to false in production | |
| 2 | +# Set to false in production | |
| 3 | 3 | DEBUG = True |
| 4 | 4 | TEMPLATE_DEBUG = False |
| 5 | 5 | |
| 6 | -## System admins | |
| 6 | +# System admins | |
| 7 | 7 | ADMINS = [['John Foo', 'john@example.com'], ['Mary Bar', 'mary@example.com']] |
| 8 | 8 | |
| 9 | 9 | MANAGERS = ADMINS |
| ... | ... | @@ -19,15 +19,15 @@ SECRET_KEY = 'not-a-secret' |
| 19 | 19 | |
| 20 | 20 | ALLOWED_HOSTS = [ |
| 21 | 21 | 'localhost', |
| 22 | -# 'example.com', | |
| 23 | -# 'example.org', | |
| 24 | -# 'example.net', | |
| 22 | + # 'example.com', | |
| 23 | + # 'example.org', | |
| 24 | + # 'example.net', | |
| 25 | 25 | ] |
| 26 | 26 | |
| 27 | -### Uncomment to enable social networks fields profile | |
| 27 | +# Uncomment to enable social networks fields profile | |
| 28 | 28 | SOCIAL_NETWORK_ENABLED = True |
| 29 | 29 | |
| 30 | -## Disable indexing | |
| 30 | +# Disable indexing | |
| 31 | 31 | ROBOTS_NOINDEX = True |
| 32 | 32 | |
| 33 | 33 | LOGGING = { | ... | ... |
tests/runtests.py