Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
qwerrrqw committed Nov 15, 2024
1 parent e65ce78 commit d93e629
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 13 deletions.
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,26 @@ All enhancements and patches to Cookiecutter Django will be documented in this f

<!-- GENERATOR_PLACEHOLDER -->

## 2024.11.14


### Updated

- Bump amazon/aws-cli from 2.20.0 to 2.21.0 ([#5528](https://github.com/cookiecutter/cookiecutter-django/pull/5528))

## 2024.11.13


### Updated

- Update werkzeug to 3.1.3 ([#5524](https://github.com/cookiecutter/cookiecutter-django/pull/5524))

- Update ruff to 0.7.3 ([#5521](https://github.com/cookiecutter/cookiecutter-django/pull/5521))

- Bump amazon/aws-cli from 2.19.0 to 2.20.0 ([#5527](https://github.com/cookiecutter/cookiecutter-django/pull/5527))

- Update django-allauth to 65.2.0 ([#5523](https://github.com/cookiecutter/cookiecutter-django/pull/5523))

## 2024.11.08


Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "cookiecutter-django"
version = "2024.11.08"
version = "2024.11.14"
description = "A Cookiecutter template for creating production-ready Django projects quickly."
readme = "README.md"
keywords = [
Expand Down
2 changes: 1 addition & 1 deletion {{cookiecutter.project_slug}}/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ repos:

# Run the Ruff linter.
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.2
rev: v0.7.3
hooks:
# Linter
- id: ruff
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/amazon/aws-cli:2.19.0
FROM docker.io/amazon/aws-cli:2.21.0

# Clear entrypoint from the base image, otherwise it's always calling the aws CLI
ENTRYPOINT []
Expand Down
28 changes: 22 additions & 6 deletions {{cookiecutter.project_slug}}/config/settings/production.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
# ruff: noqa: E501
{% if cookiecutter.use_sentry == 'y' -%}
import logging
import ssl

import sentry_sdk

{%- if cookiecutter.use_celery == 'y' %}
from sentry_sdk.integrations.celery import CeleryIntegration

{%- endif %}
from sentry_sdk.integrations.django import DjangoIntegration
from sentry_sdk.integrations.logging import LoggingIntegration
from sentry_sdk.integrations.redis import RedisIntegration

{% else %}
import ssl

{% endif -%}
from .base import * # noqa: F403
from .base import DATABASES
from .base import * # noqa: F403
from .base import INSTALLED_APPS
from .base import REDIS_URL
from .base import env
{%- if cookiecutter.use_drf == "y" %}
from .base import SPECTACULAR_SETTINGS
{%- endif %}
from .base import env

# GENERAL
# ------------------------------------------------------------------------------
Expand Down Expand Up @@ -48,10 +50,24 @@
},
}


# Redis Configuration
REDIS_URL = env("REDIS_TLS_URL")
REDIS_SSL = env.bool("REDIS_SSL", default=False)

# Celery SSL Settings
CELERY_REDIS_BACKEND_USE_SSL = {"ssl_cert_reqs": ssl.CERT_NONE}
CELERY_BROKER_USE_SSL = {"ssl_cert_reqs": ssl.CERT_NONE}
CELERY_BROKER_CONNECTION_RETRY_ON_STARTUP = True

# Configure Redis Caches for SSL if enabled
if REDIS_SSL:
CACHES["default"]["OPTIONS"]["CONNECTION_POOL_CLASS"] = "redis.connection.SSLConnection"
CACHES["default"]["OPTIONS"]["SSL_CERT_REQS"] = None
CACHES["default"]["OPTIONS"].update(
{
"CONNECTION_POOL_CLASS": "redis.connection.SSLConnection",
"SSL_CERT_REQS": None,
}
)

# SECURITY
# ------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion {{cookiecutter.project_slug}}/requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ uvicorn-worker==0.2.0 # https://github.com/Kludex/uvicorn-worker
django==5.0.9 # pyup: < 5.1 # https://www.djangoproject.com/
django-environ==0.11.2 # https://github.com/joke2k/django-environ
django-model-utils==5.0.0 # https://github.com/jazzband/django-model-utils
django-allauth[mfa]==65.1.0 # https://github.com/pennersr/django-allauth
django-allauth[mfa]==65.2.0 # https://github.com/pennersr/django-allauth
django-crispy-forms==2.3 # https://github.com/django-crispy-forms/django-crispy-forms
crispy-bootstrap5==2024.10 # https://github.com/django-crispy-forms/crispy-bootstrap5
{%- if cookiecutter.frontend_pipeline == 'Django Compressor' %}
Expand Down
6 changes: 3 additions & 3 deletions {{cookiecutter.project_slug}}/requirements/local.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-r production.txt

Werkzeug[watchdog]==3.0.6 # https://github.com/pallets/werkzeug
Werkzeug[watchdog]==3.1.3 # https://github.com/pallets/werkzeug
ipdb==0.13.13 # https://github.com/gotcha/ipdb
{%- if cookiecutter.use_docker == 'y' %}
psycopg[c]==3.2.3 # https://github.com/psycopg/psycopg
Expand Down Expand Up @@ -28,8 +28,8 @@ sphinx-autobuild==2024.10.3 # https://github.com/GaretJax/sphinx-autobuild

# Code quality
# ------------------------------------------------------------------------------
ruff==0.7.2 # https://github.com/astral-sh/ruff
coverage==7.6.4 # https://github.com/nedbat/coveragepy
ruff==0.7.3 # https://github.com/astral-sh/ruff
coverage==7.6.5 # https://github.com/nedbat/coveragepy
djlint==1.36.1 # https://github.com/Riverside-Healthcare/djLint
pre-commit==4.0.1 # https://github.com/pre-commit/pre-commit

Expand Down

0 comments on commit d93e629

Please sign in to comment.