Re: [Django] #5711: Allow non-field attributes to be serialized

2022-08-27 Thread Django
#5711: Allow non-field attributes to be serialized
--+
 Reporter:  valankar@…|Owner:  senko
 Type:  Bug   |   Status:  assigned
Component:  Core (Serialization)  |  Version:  dev
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+

Comment (by dfrankow):

 Not sure if we still want this, but I filed an updated PR at
 https://github.com/django/django/pull/16004, just to try out contributing.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070182e02d8c61-be044e29-cf89-4faa-a08d-dfe686ffeefd-00%40eu-central-1.amazonses.com.


Re: [Django] #33952: Too aggressive pk control in create_reverse_many_to_one_manager

2022-08-27 Thread Django
#33952: Too aggressive pk control in create_reverse_many_to_one_manager
-+-
 Reporter:  Claude Paroz |Owner:  David
 |  Wobrock
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  4.1
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:  fixed
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Claude Paroz):

 Many thanks David for the fix!

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070182dff556c9-5364aa11-4460-49d1-97f8-46bf02d3e2c9-00%40eu-central-1.amazonses.com.


Re: [Django] #33954: "NaN" can be stored in DecimalField but cannot be retrieved

2022-08-27 Thread Django
#33954: "NaN" can be stored in DecimalField but cannot be retrieved
-+-
 Reporter:  Xabier Bello |Owner:  Mohamed
 Type:   |  Karam
  Cleanup/optimization   |   Status:  closed
Component:  Database layer   |  Version:  4.1
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak ):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"b92ffebb0cdc469baaf1b8f0e72dddb069eb2fb4" b92ffebb]:
 {{{
 #!CommitTicketReference repository=""
 revision="b92ffebb0cdc469baaf1b8f0e72dddb069eb2fb4"
 Fixed #33954 -- Prevented models.DecimalField from accepting NaN, Inf, and
 -Inf values.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070182dfb06cb2-354ac844-c912-4ca8-abb0-0b1caf66f5ee-00%40eu-central-1.amazonses.com.


Re: [Django] #33954: "NaN" can be stored in DecimalField but cannot be retrieved

2022-08-27 Thread Django
#33954: "NaN" can be stored in DecimalField but cannot be retrieved
-+-
 Reporter:  Xabier Bello |Owner:  Mohamed
 Type:   |  Karam
  Cleanup/optimization   |   Status:  assigned
Component:  Database layer   |  Version:  4.1
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * stage:  Accepted => Ready for checkin


Comment:

 [https://github.com/django/django/pull/16002 PR]

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070182df997de0-d002dacd-4d90-45a5-b5c1-ea210cdcefdd-00%40eu-central-1.amazonses.com.


Re: [Django] #33952: Too aggressive pk control in create_reverse_many_to_one_manager

2022-08-27 Thread Django
#33952: Too aggressive pk control in create_reverse_many_to_one_manager
-+-
 Reporter:  Claude Paroz |Owner:  David
 |  Wobrock
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  4.1
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:  fixed
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Mariusz Felisiak ):

 In [changeset:"fca055315e9bb6cb1212953478dbe971b0bb47fb" fca05531]:
 {{{
 #!CommitTicketReference repository=""
 revision="fca055315e9bb6cb1212953478dbe971b0bb47fb"
 [4.1.x] Fixed #33952 -- Reallowed creating reverse foreign key managers on
 unsaved instances.

 Thanks Claude Paroz for the report.

 Regression in 7ba6ebe9149ae38257d70100e8bfbfd0da189862.

 Backport of 806e9e2d0dcf8f58e376fb7e2a8b9771e2a9ce16 from main
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070182df84e2a4-239bccb7-a24e-4e46-8709-6ddf81f0ac4c-00%40eu-central-1.amazonses.com.


Re: [Django] #33952: Too aggressive pk control in create_reverse_many_to_one_manager

2022-08-27 Thread Django
#33952: Too aggressive pk control in create_reverse_many_to_one_manager
-+-
 Reporter:  Claude Paroz |Owner:  David
 |  Wobrock
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  4.1
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:  fixed
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak ):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"806e9e2d0dcf8f58e376fb7e2a8b9771e2a9ce16" 806e9e2d]:
 {{{
 #!CommitTicketReference repository=""
 revision="806e9e2d0dcf8f58e376fb7e2a8b9771e2a9ce16"
 Fixed #33952 -- Reallowed creating reverse foreign key managers on unsaved
 instances.

 Thanks Claude Paroz for the report.

 Regression in 7ba6ebe9149ae38257d70100e8bfbfd0da189862.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070182df844c2d-c7c79ac2-78cd-4aa7-b238-a7bdf7d851dc-00%40eu-central-1.amazonses.com.


Re: [Django] #33952: Too aggressive pk control in create_reverse_many_to_one_manager

2022-08-27 Thread Django
#33952: Too aggressive pk control in create_reverse_many_to_one_manager
-+-
 Reporter:  Claude Paroz |Owner:  David
 |  Wobrock
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  4.1
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * stage:  Accepted => Ready for checkin


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070182df689003-78b94e4f-2201-413c-911c-176f12d77739-00%40eu-central-1.amazonses.com.


Re: [Django] #33928: Performance issues with `on_delete=models.SET_NULL` on large tables

2022-08-27 Thread Django
#33928: Performance issues with `on_delete=models.SET_NULL` on large tables
-+-
 Reporter:  Renan GEHAN  |Owner:  Simon
 Type:   |  Charette
  Cleanup/optimization   |   Status:  assigned
Component:  Database layer   |  Version:  3.0
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Mariusz Felisiak ):

 In [changeset:"a9be1dc5515e99ed96a2c640f5495af419c85b93" a9be1dc5]:
 {{{
 #!CommitTicketReference repository=""
 revision="a9be1dc5515e99ed96a2c640f5495af419c85b93"
 Refs #33928 -- Removed unnecessary attribute assignment on on-delete
 updates.

 Model instances retrieved for bulk field update purposes are not exposed
 to the outside world and thus are not required to be kept update to
 date.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070182df66066b-24c1ae8d-a16c-46c9-a8ce-48cee7237c8c-00%40eu-central-1.amazonses.com.


Re: [Django] #33928: Performance issues with `on_delete=models.SET_NULL` on large tables

2022-08-27 Thread Django
#33928: Performance issues with `on_delete=models.SET_NULL` on large tables
-+-
 Reporter:  Renan GEHAN  |Owner:  Simon
 Type:   |  Charette
  Cleanup/optimization   |   Status:  closed
Component:  Database layer   |  Version:  3.0
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak ):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"0701bb8e1f1771b36cdde45602ad377007e372b3" 0701bb8e]:
 {{{
 #!CommitTicketReference repository=""
 revision="0701bb8e1f1771b36cdde45602ad377007e372b3"
 Fixed #33928 -- Avoided unnecessary queries when cascade updating.

 Models that use SET, SET_NULL, and SET_DEFAULT as on_delete handler
 don't have to fetch objects for the sole purpose of passing them back to
 a follow up UPDATE query filtered by the retrieved objects primary key.

 This was achieved by flagging SET handlers as _lazy_ and having the
 collector logic defer object collections until the last minute. This
 should ensure that the rare cases where custom on_delete handlers are
 defined remain uncalled when when dealing with an empty collection of
 instances.

 This reduces the number queries required to apply SET handlers from
 2 to 1 where the remaining UPDATE use the same predicate as the non
 removed SELECT query.

 In a lot of ways this is similar to the fast-delete optimization that
 was added in #18676 but for updates this time. The conditions only
 happen to be simpler in this case because SET handlers are always
 terminal. They never cascade to more deletes that can be combined.

 Thanks Renan GEHAN for the report.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070182df660693-aa2313b9-ffcb-4b5c-8136-50751c267f3b-00%40eu-central-1.amazonses.com.


Re: [Django] #33928: Performance issues with `on_delete=models.SET_NULL` on large tables

2022-08-27 Thread Django
#33928: Performance issues with `on_delete=models.SET_NULL` on large tables
-+-
 Reporter:  Renan GEHAN  |Owner:  Simon
 Type:   |  Charette
  Cleanup/optimization   |   Status:  assigned
Component:  Database layer   |  Version:  3.0
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * needs_better_patch:  1 => 0
 * stage:  Accepted => Ready for checkin


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070182df46f2ea-e5d65e7d-9e74-4b75-8f0b-fe286db6e2f1-00%40eu-central-1.amazonses.com.


Re: [Django] #33957: The "Save and ..." buttons in the admin panel stopped working

2022-08-27 Thread Django
#33957: The "Save and ..." buttons in the admin panel stopped working
---+--
 Reporter:  Maxim K.   |Owner:  nobody
 Type:  Bug|   Status:  closed
Component:  contrib.admin  |  Version:  4.1
 Severity:  Normal |   Resolution:  duplicate
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by Mariusz Felisiak):

 * status:  new => closed
 * resolution:   => duplicate


Comment:

 Maxim, thanks for the confirmation.

 Duplicate of #33893.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070182df3c6cf9-cec3d3f1-e6b5-4634-b212-924ae268780e-00%40eu-central-1.amazonses.com.


Re: [Django] #33957: The "Save and ..." buttons in the admin panel stopped working

2022-08-27 Thread Django
#33957: The "Save and ..." buttons in the admin panel stopped working
---+--
 Reporter:  Maxim K.   |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  contrib.admin  |  Version:  4.1
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by Maxim K.):

 Replying to [comment:1 Claude Paroz]:
 > Might be related to #33893, do you have the opportunity to test with the
 tip of the stable/4.1.x Django branch?
 Indeed, I did not find the problem on the proposed branch. At least with
 several tests everything was in order. I'm really looking forward to the
 new version! Because I edit some of the data through the admin panel and
 this is a rather unpleasant phenomenon. Thank you for your work!

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070182de948b49-4f796285-1f14-47c6-852b-13e7a9f48f65-00%40eu-central-1.amazonses.com.


Re: [Django] #33957: The "Save and ..." buttons in the admin panel stopped working

2022-08-27 Thread Django
#33957: The "Save and ..." buttons in the admin panel stopped working
---+--
 Reporter:  Maxim K.   |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  contrib.admin  |  Version:  4.1
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by Claude Paroz):

 Might be related to #33893, do you have the opportunity to test with the
 tip of the stable/4.1.x Django branch?

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070182de5cfe54-6a1834cc-15f8-4812-8f53-46f35335fb27-00%40eu-central-1.amazonses.com.


[Django] #33957: The "Save and ..." buttons in the admin panel stopped working

2022-08-27 Thread Django
#33957: The "Save and ..." buttons in the admin panel stopped working
-+
   Reporter:  Maxim K.   |  Owner:  nobody
   Type:  Bug| Status:  new
  Component:  contrib.admin  |Version:  4.1
   Severity:  Normal |   Keywords:
   Triage Stage:  Unreviewed |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+
 [https://youtu.be/uR9apBZPzjU Video]

 Hello! The test was done on an empty project. Actually, I did not
 understand at what point the problem occurs, but I will try to give enough
 data, maybe it will help.

 I noticed a problem in my new project and at first I thought that some
 library could not work correctly with the new version of django. Then I
 created an empty project and the problem happened again, BUT! This problem
 does not always appear. I don't know exactly when, but two points that
 sometimes triggered it:
 1. Clear cache (ctrl+f5)
 2. Deleting rows in the same table

 In the developer console, I noticed that when submitting the form, only
 the token and group name are sent, but the permissions and the button name
 were not sent. This is probably why it does not save the resolution and
 the behavior changes when saving.

 The same problem was observed in the version of django 4.0, but there this
 problem manifested itself less

 Let me know what other information to provide?

 Deploying a project using docker

 {{{
 FROM python:3.10-alpine
 }}}


 settings.py
 {{{
 from pathlib import Path
 import os

 BASE_DIR = Path(__file__).resolve().parent.parent
 SECRET_KEY = os.environ.get("SECRET_KEY")
 DEBUG = int(os.environ.get("DEBUG", default=0))
 ALLOWED_HOSTS = os.environ.get("DJANGO_ALLOWED_HOSTS",
 default='*').split(" ")
 __SSL_ON__ = int(os.environ.get("__SSL_ON__", default=0))

 INSTALLED_APPS = [
 'django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 ]

 MIDDLEWARE = [
 'django.middleware.security.SecurityMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 ]

 ROOT_URLCONF = 'app.urls'

 TEMPLATES = [
 {
 'BACKEND': 'django.template.backends.django.DjangoTemplates',
 'DIRS': [
 os.path.join(BASE_DIR, 'templates'),
 ],
 'APP_DIRS': True,
 'OPTIONS': {
 'context_processors': [
 'django.template.context_processors.debug',
 'django.template.context_processors.request',
 'django.contrib.auth.context_processors.auth',
 'django.contrib.messages.context_processors.messages',
 ],
 },
 },
 ]

 WSGI_APPLICATION = 'app.wsgi.application'

 # Database
 # https://docs.djangoproject.com/en/4.1/ref/settings/#databases

 DATABASES = {
 'default': {
 'ENGINE': os.environ.get('SQL_ENGINE',
 'django.db.backends.sqlite3'),
 'NAME': os.environ.get('SQL_DATABASE', BASE_DIR / 'db.sqlite3'),
 'USER': os.environ.get('SQL_USER', 'user'),
 'PASSWORD': os.environ.get('SQL_PASSWORD', 'password'),
 'HOST': os.environ.get('SQL_HOST', 'localhost'),
 'PORT': os.environ.get('SQL_PORT', '5432'),
 }
 }

 # Password validation
 # https://docs.djangoproject.com/en/4.1/ref/settings/#auth-password-
 validators

 AUTH_PASSWORD_VALIDATORS = [
 {
 'NAME':
 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
 },
 {
 'NAME':
 'django.contrib.auth.password_validation.MinimumLengthValidator',
 },
 {
 'NAME':
 'django.contrib.auth.password_validation.CommonPasswordValidator',
 },
 {
 'NAME':
 'django.contrib.auth.password_validation.NumericPasswordValidator',
 },
 ]

 # Internationalization
 # https://docs.djangoproject.com/en/4.1/topics/i18n/

 LANGUAGE_CODE = 'en-us'

 TIME_ZONE = 'UTC'

 USE_I18N = True

 USE_TZ = True

 # Default primary key field type
 # https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field

 DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'

 # Static files (CSS, JavaScript, Images)
 # https://docs.djangoproject.com/en/4.1/howto/static-files/

 STATIC_URL = '/staticfiles/'
 STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
 STATICFILES_DIRS = [os.path.join(BASE_DIR,