mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-09 14:34:53 +03:00
Merge branch 'cookiecutter:master' into master
This commit is contained in:
commit
a3d99263d7
5
.github/contributors.json
vendored
5
.github/contributors.json
vendored
|
@ -1473,5 +1473,10 @@
|
|||
"name": "Jakub Boukal",
|
||||
"github_login": "SukiCZ",
|
||||
"twitter_username": ""
|
||||
},
|
||||
{
|
||||
"name": "Christian Jauvin",
|
||||
"github_login": "cjauvin",
|
||||
"twitter_username": ""
|
||||
}
|
||||
]
|
|
@ -17,7 +17,7 @@ repos:
|
|||
- id: detect-private-key
|
||||
|
||||
- repo: https://github.com/pre-commit/mirrors-prettier
|
||||
rev: "v3.0.3"
|
||||
rev: "v3.1.0"
|
||||
hooks:
|
||||
- id: prettier
|
||||
args: ["--tab-width", "2"]
|
||||
|
|
22
CHANGELOG.md
22
CHANGELOG.md
|
@ -3,6 +3,28 @@ All enhancements and patches to Cookiecutter Django will be documented in this f
|
|||
|
||||
<!-- GENERATOR_PLACEHOLDER -->
|
||||
|
||||
## 2023.11.20
|
||||
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix bug with social account adapter name override, in very specific conditions ([#4650](https://github.com/cookiecutter/cookiecutter-django/pull/4650))
|
||||
|
||||
### Updated
|
||||
|
||||
- Update django-cors-headers to 4.3.1 ([#4684](https://github.com/cookiecutter/cookiecutter-django/pull/4684))
|
||||
|
||||
- Update psycopg to 3.1.13 ([#4685](https://github.com/cookiecutter/cookiecutter-django/pull/4685))
|
||||
|
||||
## 2023.11.14
|
||||
|
||||
|
||||
### Updated
|
||||
|
||||
- Update sentry-sdk to 1.35.0 ([#4681](https://github.com/cookiecutter/cookiecutter-django/pull/4681))
|
||||
|
||||
- Auto-update pre-commit hooks ([#4683](https://github.com/cookiecutter/cookiecutter-django/pull/4683))
|
||||
|
||||
## 2023.11.11
|
||||
|
||||
|
||||
|
|
|
@ -509,6 +509,13 @@ Listed in alphabetical order.
|
|||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Christian Jauvin</td>
|
||||
<td>
|
||||
<a href="https://github.com/cjauvin">cjauvin</a>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Christopher Clarke</td>
|
||||
<td>
|
||||
|
|
|
@ -15,7 +15,7 @@ pre-commit==3.5.0
|
|||
# ------------------------------------------------------------------------------
|
||||
tox==4.11.3
|
||||
pytest==7.4.3
|
||||
pytest-xdist==3.3.1
|
||||
pytest-xdist==3.4.0
|
||||
pytest-cookies==0.7.0
|
||||
pytest-instafail==0.5.0
|
||||
pyyaml==6.0.1
|
||||
|
|
2
setup.py
2
setup.py
|
@ -5,7 +5,7 @@ except ImportError:
|
|||
from distutils.core import setup
|
||||
|
||||
# We use calendar versioning
|
||||
version = "2023.11.11"
|
||||
version = "2023.11.20"
|
||||
|
||||
with open("README.md") as readme_file:
|
||||
long_description = readme_file.read()
|
||||
|
|
|
@ -18,7 +18,7 @@ repos:
|
|||
- id: detect-private-key
|
||||
|
||||
- repo: https://github.com/pre-commit/mirrors-prettier
|
||||
rev: v3.0.3
|
||||
rev: v3.1.0
|
||||
hooks:
|
||||
- id: prettier
|
||||
args: ['--tab-width', '2', '--single-quote']
|
||||
|
|
|
@ -41,7 +41,7 @@ django-redis==5.4.0 # https://github.com/jazzband/django-redis
|
|||
{%- if cookiecutter.use_drf == 'y' %}
|
||||
# Django REST Framework
|
||||
djangorestframework==3.14.0 # https://github.com/encode/django-rest-framework
|
||||
django-cors-headers==4.3.0 # https://github.com/adamchainz/django-cors-headers
|
||||
django-cors-headers==4.3.1 # https://github.com/adamchainz/django-cors-headers
|
||||
# DRF-spectacular for api documentation
|
||||
drf-spectacular==0.26.5 # https://github.com/tfranzel/drf-spectacular
|
||||
{%- endif %}
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
Werkzeug[watchdog]==3.0.1 # https://github.com/pallets/werkzeug
|
||||
ipdb==0.13.13 # https://github.com/gotcha/ipdb
|
||||
{%- if cookiecutter.use_docker == 'y' %}
|
||||
psycopg[c]==3.1.12 # https://github.com/psycopg/psycopg
|
||||
psycopg[c]==3.1.13 # https://github.com/psycopg/psycopg
|
||||
{%- else %}
|
||||
psycopg[binary]==3.1.12 # https://github.com/psycopg/psycopg
|
||||
psycopg[binary]==3.1.13 # https://github.com/psycopg/psycopg
|
||||
{%- endif %}
|
||||
{%- if cookiecutter.use_async == 'y' or cookiecutter.use_celery == 'y' %}
|
||||
watchfiles==0.21.0 # https://github.com/samuelcolvin/watchfiles
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
-r base.txt
|
||||
|
||||
gunicorn==21.2.0 # https://github.com/benoitc/gunicorn
|
||||
psycopg[c]==3.1.12 # https://github.com/psycopg/psycopg
|
||||
psycopg[c]==3.1.13 # https://github.com/psycopg/psycopg
|
||||
{%- if cookiecutter.use_whitenoise == 'n' %}
|
||||
Collectfast==2.2.0 # https://github.com/antonagestam/collectfast
|
||||
{%- endif %}
|
||||
{%- if cookiecutter.use_sentry == "y" %}
|
||||
sentry-sdk==1.34.0 # https://github.com/getsentry/sentry-python
|
||||
sentry-sdk==1.35.0 # https://github.com/getsentry/sentry-python
|
||||
{%- endif %}
|
||||
{%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %}
|
||||
hiredis==2.2.3 # https://github.com/redis/hiredis-py
|
||||
|
|
|
@ -27,11 +27,12 @@ class SocialAccountAdapter(DefaultSocialAccountAdapter):
|
|||
|
||||
See: https://django-allauth.readthedocs.io/en/latest/advanced.html?#creating-and-populating-user-instances
|
||||
"""
|
||||
user = sociallogin.user
|
||||
user = super().populate_user(request, sociallogin, data)
|
||||
if not user.name:
|
||||
if name := data.get("name"):
|
||||
user.name = name
|
||||
elif first_name := data.get("first_name"):
|
||||
user.name = first_name
|
||||
if last_name := data.get("last_name"):
|
||||
user.name += f" {last_name}"
|
||||
return super().populate_user(request, sociallogin, data)
|
||||
return user
|
||||
|
|
Loading…
Reference in New Issue
Block a user