Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrige configuração de idioma #19

Merged
merged 6 commits into from
Jun 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 3 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,6 @@ concurrency:
cancel-in-progress: true

jobs:
linter:
runs-on: ubuntu-latest
steps:

- name: Checkout Code Repository
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
cache: pip
cache-dependency-path: |
requirements/base.txt
requirements/local.txt

- name: Run pre-commit
uses: pre-commit/action@v3.0.0

# With no caching at all the entire ci process takes 4m 30s to complete!
pytest:
runs-on: ubuntu-latest

Expand All @@ -50,6 +30,9 @@ jobs:
- name: Build the Stack
run: docker-compose -f local.yml build

- name: Make the migrations
run: docker compose -f local.yml run --rm django python manage.py makemigrations

- name: Run DB Migrations
run: docker-compose -f local.yml run --rm django python manage.py migrate

Expand Down
6 changes: 3 additions & 3 deletions config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
# In Windows, this must be set to your system time zone.
TIME_ZONE = "UTC"
# https://docs.djangoproject.com/en/dev/ref/settings/#language-code
LANGUAGE_CODE = "pt-BR"
LANGUAGE_CODE = "pt-br"
# https://docs.djangoproject.com/en/dev/ref/settings/#site-id
SITE_ID = 1
# https://docs.djangoproject.com/en/dev/ref/settings/#use-i18n
Expand Down Expand Up @@ -364,15 +364,15 @@
LANGUAGES = [
("en", "English"),
("es", "Spanish"),
("pt-BR", "Portuguese"),
("pt-br", "Portuguese"),
]

WAGTAIL_I18N_ENABLED = True

WAGTAIL_CONTENT_LANGUAGES = [
("en", "English"),
("es", "Spanish"),
("pt-BR", "Portuguese"),
("pt-br", "Portuguese"),
]

NOCAPTCHA = True
Expand Down
1 change: 1 addition & 0 deletions config/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
path("i18n/", include("django.conf.urls.i18n")),
path("", include("allauth.urls")),
path("", include(wagtail_urls)),
prefix_default_language=False,
)

if settings.DEBUG:
Expand Down
1 change: 1 addition & 0 deletions core/users/tests/test_urls.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

from django.urls import resolve, reverse

from core.users.models import User
Expand Down
2 changes: 1 addition & 1 deletion local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ services:
image: edoburu/pgbouncer:1.14.0
container_name: scielo_usage_local_pgbouncer
environment:
- DATABASE_URL=postgres://GVRFlLmcCNfGLhsFvSnCioYOPJPYpyfj:BQ4hSUL4rdj5WZLdR8ilDLRQMvCtzo0caMaXDO0olGsmycQjlcZlTVK9DepZR8kk@postgres/scielo_core
- DATABASE_URL=postgres://GVRFlLmcCNfGLhsFvSnCioYOPJPYpyfj:BQ4hSUL4rdj5WZLdR8ilDLRQMvCtzo0caMaXDO0olGsmycQjlcZlTVK9DepZR8kk@postgres/scielo_usage
- MAX_CLIENT_CONN=100
ports:
- 6439:5432
Expand Down
4 changes: 2 additions & 2 deletions log_manager/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ def task_discover(self, collection_acron2, is_enabled=True, temporal_reference=N
raise exceptions.InvalidDateFormatError('ERROR. Please, use a valid date format (YYYY-MM-DD).')

for cd in col_configs_dirs:
for root, _, files in os.walk(cd.value):
for root, _sub_dirs, files in os.walk(cd.value):
for name in files:
_, extension = os.path.splitext(name)
_name, extension = os.path.splitext(name)
if extension.lower() not in app_config_log_file_formats:
continue

Expand Down
8 changes: 4 additions & 4 deletions production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ services:
image: edoburu/pgbouncer:1.14.0
restart: always
environment:
- DATABASE_URL=postgres://GVRFlLmcCNfGLhsFvSnCioYOPJPYpyfj:DAkWfpsnPHcAxMeQk2QmPOIZuz4BXG5qGFWi2hCCQE6kvndJHTuzz8SjnxOJY5qj@postgres/core
- DATABASE_URL=postgres://GVRFlLmcCNfGLhsFvSnCioYOPJPYpyfj:DAkWfpsnPHcAxMeQk2QmPOIZuz4BXG5qGFWi2hCCQE6kvndJHTuzz8SjnxOJY5qj@postgres/scielo_usage
- MAX_CLIENT_CONN=100
ports:
- 6434:5432
Expand All @@ -39,8 +39,8 @@ services:
dockerfile: ./compose/production/postgres/Dockerfile
image: scielo_usage_production_postgres
volumes:
- ../scms_data/scielo_core/data_prod:/var/lib/postgresql/data:Z
- ../scms_data/scielo_core/data_prod_backup:/backups:z
- ../scms_data/scielo_usage/data_prod:/var/lib/postgresql/data:Z
- ../scms_data/scielo_usage/data_prod_backup:/backups:z
ports:
- "5432:5432"
env_file:
Expand All @@ -65,7 +65,7 @@ services:
depends_on:
- django
volumes:
- ../scms_data/scielo_core/traefik:/etc/traefik/acme:z
- ../scms_data/scielo_usage/traefik:/etc/traefik/acme:z
ports:
- "0.0.0.0:80:80"
- "0.0.0.0:443:443"
Expand Down
Loading