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",
|
"name": "Jakub Boukal",
|
||||||
"github_login": "SukiCZ",
|
"github_login": "SukiCZ",
|
||||||
"twitter_username": ""
|
"twitter_username": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Christian Jauvin",
|
||||||
|
"github_login": "cjauvin",
|
||||||
|
"twitter_username": ""
|
||||||
}
|
}
|
||||||
]
|
]
|
|
@ -17,7 +17,7 @@ repos:
|
||||||
- id: detect-private-key
|
- id: detect-private-key
|
||||||
|
|
||||||
- repo: https://github.com/pre-commit/mirrors-prettier
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
||||||
rev: "v3.0.3"
|
rev: "v3.1.0"
|
||||||
hooks:
|
hooks:
|
||||||
- id: prettier
|
- id: prettier
|
||||||
args: ["--tab-width", "2"]
|
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 -->
|
<!-- 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
|
## 2023.11.11
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -509,6 +509,13 @@ Listed in alphabetical order.
|
||||||
</td>
|
</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Christian Jauvin</td>
|
||||||
|
<td>
|
||||||
|
<a href="https://github.com/cjauvin">cjauvin</a>
|
||||||
|
</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Christopher Clarke</td>
|
<td>Christopher Clarke</td>
|
||||||
<td>
|
<td>
|
||||||
|
|
|
@ -15,7 +15,7 @@ pre-commit==3.5.0
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
tox==4.11.3
|
tox==4.11.3
|
||||||
pytest==7.4.3
|
pytest==7.4.3
|
||||||
pytest-xdist==3.3.1
|
pytest-xdist==3.4.0
|
||||||
pytest-cookies==0.7.0
|
pytest-cookies==0.7.0
|
||||||
pytest-instafail==0.5.0
|
pytest-instafail==0.5.0
|
||||||
pyyaml==6.0.1
|
pyyaml==6.0.1
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -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.11.11"
|
version = "2023.11.20"
|
||||||
|
|
||||||
with open("README.md") as readme_file:
|
with open("README.md") as readme_file:
|
||||||
long_description = readme_file.read()
|
long_description = readme_file.read()
|
||||||
|
|
|
@ -18,7 +18,7 @@ repos:
|
||||||
- id: detect-private-key
|
- id: detect-private-key
|
||||||
|
|
||||||
- repo: https://github.com/pre-commit/mirrors-prettier
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
||||||
rev: v3.0.3
|
rev: v3.1.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: prettier
|
- id: prettier
|
||||||
args: ['--tab-width', '2', '--single-quote']
|
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' %}
|
{%- if cookiecutter.use_drf == 'y' %}
|
||||||
# Django REST Framework
|
# Django REST Framework
|
||||||
djangorestframework==3.14.0 # https://github.com/encode/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 for api documentation
|
||||||
drf-spectacular==0.26.5 # https://github.com/tfranzel/drf-spectacular
|
drf-spectacular==0.26.5 # https://github.com/tfranzel/drf-spectacular
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
Werkzeug[watchdog]==3.0.1 # https://github.com/pallets/werkzeug
|
Werkzeug[watchdog]==3.0.1 # 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' %}
|
||||||
psycopg[c]==3.1.12 # https://github.com/psycopg/psycopg
|
psycopg[c]==3.1.13 # https://github.com/psycopg/psycopg
|
||||||
{%- else %}
|
{%- else %}
|
||||||
psycopg[binary]==3.1.12 # https://github.com/psycopg/psycopg
|
psycopg[binary]==3.1.13 # https://github.com/psycopg/psycopg
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- if cookiecutter.use_async == 'y' or cookiecutter.use_celery == 'y' %}
|
{%- if cookiecutter.use_async == 'y' or cookiecutter.use_celery == 'y' %}
|
||||||
watchfiles==0.21.0 # https://github.com/samuelcolvin/watchfiles
|
watchfiles==0.21.0 # https://github.com/samuelcolvin/watchfiles
|
||||||
|
|
|
@ -3,12 +3,12 @@
|
||||||
-r base.txt
|
-r base.txt
|
||||||
|
|
||||||
gunicorn==21.2.0 # https://github.com/benoitc/gunicorn
|
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' %}
|
{%- if cookiecutter.use_whitenoise == 'n' %}
|
||||||
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.34.0 # https://github.com/getsentry/sentry-python
|
sentry-sdk==1.35.0 # 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
|
||||||
|
|
|
@ -27,11 +27,12 @@ class SocialAccountAdapter(DefaultSocialAccountAdapter):
|
||||||
|
|
||||||
See: https://django-allauth.readthedocs.io/en/latest/advanced.html?#creating-and-populating-user-instances
|
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 name := data.get("name"):
|
if not user.name:
|
||||||
user.name = name
|
if name := data.get("name"):
|
||||||
elif first_name := data.get("first_name"):
|
user.name = name
|
||||||
user.name = first_name
|
elif first_name := data.get("first_name"):
|
||||||
if last_name := data.get("last_name"):
|
user.name = first_name
|
||||||
user.name += f" {last_name}"
|
if last_name := data.get("last_name"):
|
||||||
return super().populate_user(request, sociallogin, data)
|
user.name += f" {last_name}"
|
||||||
|
return user
|
||||||
|
|
Loading…
Reference in New Issue
Block a user