Merge branch 'master' into django-stubs-mypy-compat

# Conflicts:
#	{{cookiecutter.project_slug}}/requirements/local.txt
This commit is contained in:
Bruno Alla 2023-06-08 17:11:15 +01:00
commit ae5c5d4f9e
No known key found for this signature in database
20 changed files with 445 additions and 19 deletions

View File

@ -1392,5 +1392,10 @@
"name": "Birtibu", "name": "Birtibu",
"github_login": "Birtibu", "github_login": "Birtibu",
"twitter_username": "" "twitter_username": ""
},
{
"name": "Matheus Jardim Bernardes",
"github_login": "matheusjardimb",
"twitter_username": ""
} }
] ]

View File

@ -3,6 +3,49 @@ All enhancements and patches to Cookiecutter Django will be documented in this f
<!-- GENERATOR_PLACEHOLDER --> <!-- GENERATOR_PLACEHOLDER -->
## 2023.06.07
### Changed
- Replace `runserver` with `runserver_plus` ([#4373](https://github.com/cookiecutter/cookiecutter-django/pull/4373))
- Add translations for Brazilian Portuguese ([#4367](https://github.com/cookiecutter/cookiecutter-django/pull/4367))
### Updated
- Update sentry-sdk to 1.25.1 ([#4376](https://github.com/cookiecutter/cookiecutter-django/pull/4376))
- Update django-extensions to 3.2.3 ([#4372](https://github.com/cookiecutter/cookiecutter-django/pull/4372))
- Update djangorestframework-stubs to 3.14.1 ([#4366](https://github.com/cookiecutter/cookiecutter-django/pull/4366))
- Update django-stubs to 4.2.1 ([#4365](https://github.com/cookiecutter/cookiecutter-django/pull/4365))
- Update mypy to 1.3.0 ([#4327](https://github.com/cookiecutter/cookiecutter-django/pull/4327))
## 2023.06.02
### Updated
- Update sentry-sdk to 1.25.0 ([#4364](https://github.com/cookiecutter/cookiecutter-django/pull/4364))
## 2023.05.30
### Updated
- Update hiredis to 2.2.3 ([#4360](https://github.com/cookiecutter/cookiecutter-django/pull/4360))
- Update django-debug-toolbar to 4.1.0 ([#4359](https://github.com/cookiecutter/cookiecutter-django/pull/4359))
- Update redis to 4.5.5 ([#4358](https://github.com/cookiecutter/cookiecutter-django/pull/4358))
- Update django-anymail to 10.0 ([#4357](https://github.com/cookiecutter/cookiecutter-django/pull/4357))
- Update coverage to 7.2.7 ([#4356](https://github.com/cookiecutter/cookiecutter-django/pull/4356))
## 2023.05.28 ## 2023.05.28

View File

@ -1314,6 +1314,13 @@ Listed in alphabetical order.
</td> </td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>Matheus Jardim Bernardes</td>
<td>
<a href="https://github.com/matheusjardimb">matheusjardimb</a>
</td>
<td></td>
</tr>
<tr> <tr>
<td>Mathijs Hoogland</td> <td>Mathijs Hoogland</td>
<td> <td>

View File

@ -1,3 +1,3 @@
sphinx==6.2.1 sphinx==6.2.1
sphinx-rtd-theme==1.2.1 sphinx-rtd-theme==1.2.2
myst-parser==1.0.0 myst-parser==1.0.0

View File

@ -194,7 +194,9 @@ def handle_js_runner(choice, use_docker, use_async):
"gulp-uglify-es", "gulp-uglify-es",
] ]
if not use_docker: if not use_docker:
dev_django_cmd = "uvicorn config.asgi:application --reload" if use_async else "python manage.py runserver" dev_django_cmd = (
"uvicorn config.asgi:application --reload" if use_async else "python manage.py runserver_plus"
)
scripts.update( scripts.update(
{ {
"dev": "concurrently npm:dev:*", "dev": "concurrently npm:dev:*",

View File

@ -12,7 +12,7 @@ pre-commit==3.3.2
# Testing # Testing
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
tox==4.5.2 tox==4.6.0
pytest==7.3.1 pytest==7.3.1
pytest-xdist==3.3.1 pytest-xdist==3.3.1
pytest-cookies==0.7.0 pytest-cookies==0.7.0

View File

@ -5,7 +5,7 @@ except ImportError:
from distutils.core import setup from distutils.core import setup
# We use calendar versioning # We use calendar versioning
version = "2023.05.28" version = "2023.06.07"
with open("README.rst") as readme_file: with open("README.rst") as readme_file:
long_description = readme_file.read() long_description = readme_file.read()

View File

@ -0,0 +1,33 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="runserver_plus" type="Python.DjangoServer" factoryName="Django server" singleton="true">
<module name="{{ cookiecutter.project_slug }}" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
<env name="DJANGO_SETTINGS_MODULE" value="config.settings.local" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<PathMappingSettings>
<option name="pathMappings">
<list>
<mapping local-root="$PROJECT_DIR$" remote-root="/app" />
</list>
</option>
</PathMappingSettings>
<option name="launchJavascriptDebuger" value="false" />
<option name="port" value="8000" />
<option name="host" value="0.0.0.0" />
<option name="additionalOptions" value="" />
<option name="browserUrl" value="" />
<option name="runTestServer" value="false" />
<option name="runNoReload" value="false" />
<option name="useCustomRunCommand" value="true" />
<option name="customRunCommand" value="runserver_plus" />
<method />
</configuration>
</component>

View File

@ -1,5 +1,5 @@
# define an alias for the specific python version used in this file. # define an alias for the specific python version used in this file.
FROM python:3.11.3-slim-bullseye as python FROM python:3.11.4-slim-bullseye as python
# Python build stage # Python build stage
FROM python as python-build-stage FROM python as python-build-stage

View File

@ -9,5 +9,5 @@ python manage.py migrate
{%- if cookiecutter.use_async == 'y' %} {%- if cookiecutter.use_async == 'y' %}
exec uvicorn config.asgi:application --host 0.0.0.0 --reload --reload-include '*.html' exec uvicorn config.asgi:application --host 0.0.0.0 --reload --reload-include '*.html'
{%- else %} {%- else %}
exec python manage.py runserver 0.0.0.0:8000 exec python manage.py runserver_plus 0.0.0.0:8000
{%- endif %} {%- endif %}

View File

@ -1,5 +1,5 @@
# define an alias for the specific python version used in this file. # define an alias for the specific python version used in this file.
FROM python:3.11.3-slim-bullseye as python FROM python:3.11.4-slim-bullseye as python
# Python build stage # Python build stage

View File

@ -25,7 +25,7 @@ RUN npm run build
{%- endif %} {%- endif %}
# define an alias for the specific python version used in this file. # define an alias for the specific python version used in this file.
FROM python:3.11.3-slim-bullseye as python FROM python:3.11.4-slim-bullseye as python
# Python build stage # Python build stage
FROM python as python-build-stage FROM python as python-build-stage

View File

@ -26,6 +26,12 @@ DEBUG = env.bool("DJANGO_DEBUG", False)
TIME_ZONE = "{{ cookiecutter.timezone }}" TIME_ZONE = "{{ cookiecutter.timezone }}"
# https://docs.djangoproject.com/en/dev/ref/settings/#language-code # https://docs.djangoproject.com/en/dev/ref/settings/#language-code
LANGUAGE_CODE = "en-us" LANGUAGE_CODE = "en-us"
# https://docs.djangoproject.com/en/dev/ref/settings/#languages
# from django.utils.translation import gettext_lazy as _
# LANGUAGES = [
# ('en', _('English')),
# ('pt-br', _('Português')),
# ]
# https://docs.djangoproject.com/en/dev/ref/settings/#site-id # https://docs.djangoproject.com/en/dev/ref/settings/#site-id
SITE_ID = 1 SITE_ID = 1
# https://docs.djangoproject.com/en/dev/ref/settings/#use-i18n # https://docs.djangoproject.com/en/dev/ref/settings/#use-i18n

View File

@ -1,6 +1,14 @@
Translations Translations
============ ============
Translations will be placed in this folder when running:: Start by configuring `LANGUAGES` at settings, by uncommenting languages you are willing to support.
python manage.py makemessages Translations will be placed in this folder when running:
python manage.py makemessages --all
Then you should edit the .po files providing proper translations and then run the following for compiling the messages:
python manage.py compilemessages
Note: You may need to restart the django server for changes to take effect.

View File

@ -0,0 +1,321 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-06-04 21:42+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: {{cookiecutter.project_slug}}/templates/account/account_inactive.html:5
#: {{cookiecutter.project_slug}}/templates/account/account_inactive.html:8
msgid "Account Inactive"
msgstr "Conta Inativa"
#: {{cookiecutter.project_slug}}/templates/account/account_inactive.html:10
msgid "This account is inactive."
msgstr "Esta conta está inativa."
#: {{cookiecutter.project_slug}}/templates/account/email.html:7
msgid "Account"
msgstr "Conta"
#: {{cookiecutter.project_slug}}/templates/account/email.html:10
msgid "E-mail Addresses"
msgstr "Endereços de E-mail"
#: {{cookiecutter.project_slug}}/templates/account/email.html:13
msgid "The following e-mail addresses are associated with your account:"
msgstr "Os seguintes endereços de e-mail estão associados à sua conta:"
#: {{cookiecutter.project_slug}}/templates/account/email.html:27
msgid "Verified"
msgstr "Verificado"
#: {{cookiecutter.project_slug}}/templates/account/email.html:29
msgid "Unverified"
msgstr "Não verificado"
#: {{cookiecutter.project_slug}}/templates/account/email.html:31
msgid "Primary"
msgstr "Primário"
#: {{cookiecutter.project_slug}}/templates/account/email.html:37
msgid "Make Primary"
msgstr "Tornar Primário"
#: {{cookiecutter.project_slug}}/templates/account/email.html:38
msgid "Re-send Verification"
msgstr "Reenviar verificação"
#: {{cookiecutter.project_slug}}/templates/account/email.html:39
msgid "Remove"
msgstr "Remover"
#: {{cookiecutter.project_slug}}/templates/account/email.html:46
msgid "Warning:"
msgstr "Aviso:"
#: {{cookiecutter.project_slug}}/templates/account/email.html:46
msgid ""
"You currently do not have any e-mail address set up. You should really add "
"an e-mail address so you can receive notifications, reset your password, etc."
msgstr ""
"No momento, você não tem nenhum endereço de e-mail configurado. Você "
"realmente deve adicionar um endereço de e-mail para receber notificações, "
"redefinir sua senha etc."
#: {{cookiecutter.project_slug}}/templates/account/email.html:51
msgid "Add E-mail Address"
msgstr "Adicionar Endereço de E-mail"
#: {{cookiecutter.project_slug}}/templates/account/email.html:56
msgid "Add E-mail"
msgstr "Adicionar E-mail"
#: {{cookiecutter.project_slug}}/templates/account/email.html:66
msgid "Do you really want to remove the selected e-mail address?"
msgstr "Você realmente deseja remover o endereço de e-mail selecionado?"
#: {{cookiecutter.project_slug}}/templates/account/email_confirm.html:6
#: {{cookiecutter.project_slug}}/templates/account/email_confirm.html:10
msgid "Confirm E-mail Address"
msgstr "Confirme o endereço de e-mail"
#: {{cookiecutter.project_slug}}/templates/account/email_confirm.html:16
#, python-format
msgid ""
"Please confirm that <a href=\"mailto:%(email)s\">%(email)s</a> is an e-mail "
"address for user %(user_display)s."
msgstr ""
"Confirme se <a href=\"mailto:%(email)s\">%(email)s</a> é um endereço de "
"e-mail do usuário %(user_display)s."
#: {{cookiecutter.project_slug}}/templates/account/email_confirm.html:20
msgid "Confirm"
msgstr "Confirmar"
#: {{cookiecutter.project_slug}}/templates/account/email_confirm.html:27
#, python-format
msgid ""
"This e-mail confirmation link expired or is invalid. Please <a href="
"\"%(email_url)s\">issue a new e-mail confirmation request</a>."
msgstr "Este link de confirmação de e-mail expirou ou é inválido. "
"Por favor, <a href=\"%(email_url)s\">emita um novo pedido de confirmação por e-mail</a>."
#: {{cookiecutter.project_slug}}/templates/account/login.html:7
#: {{cookiecutter.project_slug}}/templates/account/login.html:11
#: {{cookiecutter.project_slug}}/templates/account/login.html:56
#: {{cookiecutter.project_slug}}/templates/base.html:72
msgid "Sign In"
msgstr "Entrar"
#: {{cookiecutter.project_slug}}/templates/account/login.html:17
msgid "Please sign in with one of your existing third party accounts:"
msgstr "Faça login com uma de suas contas de terceiros existentes:"
#: {{cookiecutter.project_slug}}/templates/account/login.html:19
#, python-format
msgid ""
"Or, <a href=\"%(signup_url)s\">sign up</a> for a %(site_name)s account and "
"sign in below:"
msgstr "Ou, <a href=\"%(signup_url)s\">cadastre-se</a> para uma conta em %(site_name)s e entre abaixo:"
#: {{cookiecutter.project_slug}}/templates/account/login.html:32
msgid "or"
msgstr "or"
#: {{cookiecutter.project_slug}}/templates/account/login.html:41
#, python-format
msgid ""
"If you have not created an account yet, then please <a href=\"%(signup_url)s"
"\">sign up</a> first."
msgstr "Se você ainda não criou uma conta, <a href=\"%(signup_url)s"
"\">registre-se primeiro</a>."
#: {{cookiecutter.project_slug}}/templates/account/login.html:55
msgid "Forgot Password?"
msgstr "Esqueceu sua senha?"
#: {{cookiecutter.project_slug}}/templates/account/logout.html:5
#: {{cookiecutter.project_slug}}/templates/account/logout.html:8
#: {{cookiecutter.project_slug}}/templates/account/logout.html:17
#: {{cookiecutter.project_slug}}/templates/base.html:61
msgid "Sign Out"
msgstr "Sair"
#: {{cookiecutter.project_slug}}/templates/account/logout.html:10
msgid "Are you sure you want to sign out?"
msgstr "Você tem certeza que deseja sair?"
#: {{cookiecutter.project_slug}}/templates/account/password_change.html:6
#: {{cookiecutter.project_slug}}/templates/account/password_change.html:9
#: {{cookiecutter.project_slug}}/templates/account/password_change.html:14
#: {{cookiecutter.project_slug}}/templates/account/password_reset_from_key.html:5
#: {{cookiecutter.project_slug}}/templates/account/password_reset_from_key.html:8
#: {{cookiecutter.project_slug}}/templates/account/password_reset_from_key_done.html:4
#: {{cookiecutter.project_slug}}/templates/account/password_reset_from_key_done.html:7
msgid "Change Password"
msgstr "Alterar Senha"
#: {{cookiecutter.project_slug}}/templates/account/password_reset.html:7
#: {{cookiecutter.project_slug}}/templates/account/password_reset.html:11
#: {{cookiecutter.project_slug}}/templates/account/password_reset_done.html:6
#: {{cookiecutter.project_slug}}/templates/account/password_reset_done.html:9
msgid "Password Reset"
msgstr "Redefinição de senha"
#: {{cookiecutter.project_slug}}/templates/account/password_reset.html:16
msgid ""
"Forgotten your password? Enter your e-mail address below, and we'll send you "
"an e-mail allowing you to reset it."
msgstr "Esqueceu sua senha? Digite seu endereço de e-mail abaixo e enviaremos um e-mail permitindo que você o redefina."
#: {{cookiecutter.project_slug}}/templates/account/password_reset.html:21
msgid "Reset My Password"
msgstr "Redefinir minha senha"
#: {{cookiecutter.project_slug}}/templates/account/password_reset.html:24
msgid "Please contact us if you have any trouble resetting your password."
msgstr "Entre em contato conosco se tiver algum problema para redefinir sua senha."
#: {{cookiecutter.project_slug}}/templates/account/password_reset_done.html:15
msgid ""
"We have sent you an e-mail. Please contact us if you do not receive it "
"within a few minutes."
msgstr "Enviamos um e-mail para você. Entre em contato conosco se você não recebê-lo dentro de alguns minutos."
#: {{cookiecutter.project_slug}}/templates/account/password_reset_from_key.html:8
msgid "Bad Token"
msgstr "Token Inválido"
#: {{cookiecutter.project_slug}}/templates/account/password_reset_from_key.html:12
#, python-format
msgid ""
"The password reset link was invalid, possibly because it has already been "
"used. Please request a <a href=\"%(passwd_reset_url)s\">new password reset</"
"a>."
msgstr "O link de redefinição de senha era inválido, possivelmente porque já foi usado. "
"<a href=\"%(passwd_reset_url)s\">Solicite uma nova redefinição de senha</a>."
#: {{cookiecutter.project_slug}}/templates/account/password_reset_from_key.html:18
msgid "change password"
msgstr "alterar senha"
#: {{cookiecutter.project_slug}}/templates/account/password_reset_from_key.html:21
#: {{cookiecutter.project_slug}}/templates/account/password_reset_from_key_done.html:8
msgid "Your password is now changed."
msgstr "Sua senha agora foi alterada."
#: {{cookiecutter.project_slug}}/templates/account/password_set.html:6
#: {{cookiecutter.project_slug}}/templates/account/password_set.html:9
#: {{cookiecutter.project_slug}}/templates/account/password_set.html:14
msgid "Set Password"
msgstr "Definir Senha"
#: {{cookiecutter.project_slug}}/templates/account/signup.html:6
msgid "Signup"
msgstr "Cadastro"
#: {{cookiecutter.project_slug}}/templates/account/signup.html:9
#: {{cookiecutter.project_slug}}/templates/account/signup.html:19
#: {{cookiecutter.project_slug}}/templates/base.html:67
msgid "Sign Up"
msgstr "Cadastro"
#: {{cookiecutter.project_slug}}/templates/account/signup.html:11
#, python-format
msgid ""
"Already have an account? Then please <a href=\"%(login_url)s\">sign in</a>."
msgstr "já tem uma conta? Então, por favor, faça <a href=\"%(login_url)s\">login</a>."
#: {{cookiecutter.project_slug}}/templates/account/signup_closed.html:5
#: {{cookiecutter.project_slug}}/templates/account/signup_closed.html:8
msgid "Sign Up Closed"
msgstr "Inscrições encerradas"
#: {{cookiecutter.project_slug}}/templates/account/signup_closed.html:10
msgid "We are sorry, but the sign up is currently closed."
msgstr "Lamentamos, mas as inscrições estão encerradas no momento."
#: {{cookiecutter.project_slug}}/templates/account/verification_sent.html:5
#: {{cookiecutter.project_slug}}/templates/account/verification_sent.html:8
#: {{cookiecutter.project_slug}}/templates/account/verified_email_required.html:5
#: {{cookiecutter.project_slug}}/templates/account/verified_email_required.html:8
msgid "Verify Your E-mail Address"
msgstr "Verifique seu endereço de e-mail"
#: {{cookiecutter.project_slug}}/templates/account/verification_sent.html:10
msgid ""
"We have sent an e-mail to you for verification. Follow the link provided to "
"finalize the signup process. Please contact us if you do not receive it "
"within a few minutes."
msgstr "Enviamos um e-mail para você para verificação. Siga o link fornecido para finalizar o processo de inscrição. Entre em contato conosco se você não recebê-lo dentro de alguns minutos."
#: {{cookiecutter.project_slug}}/templates/account/verified_email_required.html:12
msgid ""
"This part of the site requires us to verify that\n"
"you are who you claim to be. For this purpose, we require that you\n"
"verify ownership of your e-mail address. "
msgstr "Esta parte do site exige que verifiquemos se você é quem afirma ser.\n"
"Para esse fim, exigimos que você verifique a propriedade\n"
"do seu endereço de e-mail."
#: {{cookiecutter.project_slug}}/templates/account/verified_email_required.html:16
msgid ""
"We have sent an e-mail to you for\n"
"verification. Please click on the link inside this e-mail. Please\n"
"contact us if you do not receive it within a few minutes."
msgstr "Enviamos um e-mail para você para verificação.\n"
"Por favor, clique no link dentro deste e-mail.\n"
"Entre em contato conosco se você não recebê-lo dentro de alguns minutos."
#: {{cookiecutter.project_slug}}/templates/account/verified_email_required.html:20
#, python-format
msgid ""
"<strong>Note:</strong> you can still <a href=\"%(email_url)s\">change your e-"
"mail address</a>."
msgstr "<strong>Nota</strong>: você ainda pode <a href=\"%(email_url)s\">alterar seu endereço de e-mail</a>."
#: {{cookiecutter.project_slug}}/templates/base.html:57
msgid "My Profile"
msgstr "Meu perfil"
#: {{cookiecutter.project_slug}}/users/admin.py:17
msgid "Personal info"
msgstr "Informação pessoal"
#: {{cookiecutter.project_slug}}/users/admin.py:19
msgid "Permissions"
msgstr "Permissões"
#: {{cookiecutter.project_slug}}/users/admin.py:30
msgid "Important dates"
msgstr "Datas importantes"
#: {{cookiecutter.project_slug}}/users/apps.py:7
msgid "Users"
msgstr "Usuários"
#: {{cookiecutter.project_slug}}/users/forms.py:24
#: {{cookiecutter.project_slug}}/users/tests/test_forms.py:36
msgid "This username has already been taken."
msgstr "Este nome de usuário já foi usado."
#: {{cookiecutter.project_slug}}/users/models.py:15
msgid "Name of User"
msgstr "Nome do Usuário"
#: {{cookiecutter.project_slug}}/users/views.py:23
msgid "Information successfully updated"
msgstr "Informação atualizada com sucesso"

View File

@ -16,7 +16,7 @@ redis==4.5.5 # https://github.com/redis/redis-py
hiredis==2.2.3 # https://github.com/redis/hiredis-py hiredis==2.2.3 # https://github.com/redis/hiredis-py
{%- endif %} {%- endif %}
{%- if cookiecutter.use_celery == "y" %} {%- if cookiecutter.use_celery == "y" %}
celery==5.2.7 # pyup: < 6.0 # https://github.com/celery/celery celery==5.3.0 # pyup: < 6.0 # https://github.com/celery/celery
django-celery-beat==2.5.0 # https://github.com/celery/django-celery-beat django-celery-beat==2.5.0 # https://github.com/celery/django-celery-beat
{%- if cookiecutter.use_docker == 'y' %} {%- if cookiecutter.use_docker == 'y' %}
flower==1.2.0 # https://github.com/mher/flower flower==1.2.0 # https://github.com/mher/flower

View File

@ -1,6 +1,6 @@
-r base.txt -r base.txt
Werkzeug[watchdog]==2.3.4 # https://github.com/pallets/werkzeug Werkzeug[watchdog]==2.3.5 # https://github.com/pallets/werkzeug
ipdb==0.13.13 # https://github.com/gotcha/ipdb ipdb==0.13.13 # https://github.com/gotcha/ipdb
{%- if cookiecutter.use_docker == 'y' %} {%- if cookiecutter.use_docker == 'y' %}
psycopg2==2.9.6 # https://github.com/psycopg/psycopg2 psycopg2==2.9.6 # https://github.com/psycopg/psycopg2
@ -13,12 +13,12 @@ watchfiles==0.19.0 # https://github.com/samuelcolvin/watchfiles
# Testing # Testing
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
mypy==1.2.0 # https://github.com/python/mypy mypy==1.3.0 # https://github.com/python/mypy
django-stubs[compatible-mypy]==4.2.0 # https://github.com/typeddjango/django-stubs django-stubs[compatible-mypy]==4.2.1 # https://github.com/typeddjango/django-stubs
pytest==7.3.1 # https://github.com/pytest-dev/pytest pytest==7.3.1 # https://github.com/pytest-dev/pytest
pytest-sugar==0.9.7 # https://github.com/Frozenball/pytest-sugar pytest-sugar==0.9.7 # https://github.com/Frozenball/pytest-sugar
{%- if cookiecutter.use_drf == "y" %} {%- if cookiecutter.use_drf == "y" %}
djangorestframework-stubs[compatible-mypy]==3.14.0 # https://github.com/typeddjango/djangorestframework-stubs djangorestframework-stubs[compatible-mypy]==3.14.1 # https://github.com/typeddjango/djangorestframework-stubs
{%- endif %} {%- endif %}
# Documentation # Documentation
@ -43,6 +43,6 @@ pre-commit==3.3.2 # https://github.com/pre-commit/pre-commit
factory-boy==3.2.1 # https://github.com/FactoryBoy/factory_boy factory-boy==3.2.1 # https://github.com/FactoryBoy/factory_boy
django-debug-toolbar==4.1.0 # https://github.com/jazzband/django-debug-toolbar django-debug-toolbar==4.1.0 # https://github.com/jazzband/django-debug-toolbar
django-extensions==3.2.1 # https://github.com/django-extensions/django-extensions django-extensions==3.2.3 # https://github.com/django-extensions/django-extensions
django-coverage-plugin==3.0.0 # https://github.com/nedbat/django_coverage_plugin django-coverage-plugin==3.0.0 # https://github.com/nedbat/django_coverage_plugin
pytest-django==4.5.2 # https://github.com/pytest-dev/pytest-django pytest-django==4.5.2 # https://github.com/pytest-dev/pytest-django

View File

@ -8,7 +8,7 @@ psycopg2==2.9.6 # https://github.com/psycopg/psycopg2
Collectfast==2.2.0 # https://github.com/antonagestam/collectfast Collectfast==2.2.0 # https://github.com/antonagestam/collectfast
{%- endif %} {%- endif %}
{%- if cookiecutter.use_sentry == "y" %} {%- if cookiecutter.use_sentry == "y" %}
sentry-sdk==1.24.0 # https://github.com/getsentry/sentry-python sentry-sdk==1.25.1 # https://github.com/getsentry/sentry-python
{%- endif %} {%- endif %}
{%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %} {%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %}
hiredis==2.2.3 # https://github.com/redis/hiredis-py hiredis==2.2.3 # https://github.com/redis/hiredis-py

View File

@ -1 +1 @@
python-3.11.3 python-3.11.4

View File

@ -7,6 +7,7 @@ from django.contrib.sessions.middleware import SessionMiddleware
from django.http import HttpRequest, HttpResponseRedirect from django.http import HttpRequest, HttpResponseRedirect
from django.test import RequestFactory from django.test import RequestFactory
from django.urls import reverse from django.urls import reverse
from django.utils.translation import gettext_lazy as _
from {{ cookiecutter.project_slug }}.users.forms import UserAdminChangeForm from {{ cookiecutter.project_slug }}.users.forms import UserAdminChangeForm
from {{ cookiecutter.project_slug }}.users.models import User from {{ cookiecutter.project_slug }}.users.models import User
@ -72,7 +73,7 @@ class TestUserUpdateView:
view.form_valid(form) view.form_valid(form)
messages_sent = [m.message for m in messages.get_messages(request)] messages_sent = [m.message for m in messages.get_messages(request)]
assert messages_sent == ["Information successfully updated"] assert messages_sent == [_("Information successfully updated")]
class TestUserRedirectView: class TestUserRedirectView: