Re: [Django] #29725: Inefficient SQL generated when counting a ManyToMany

2024-02-15 Thread Django
#29725: Inefficient SQL generated when counting a ManyToMany
-+-
 Reporter:  Gavin Wahl   |Owner:  ontowhee
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  Database layer   |  Version:  dev
  (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
 * needs_tests:  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/0107018db0ecdc78-8ef5003a-c820-4060-842e-83771552c4bb-00%40eu-central-1.amazonses.com.


Re: [Django] #34060: Creating CheckConstraint on JSONField with __exact lookup on key transforms crashes on Oracle.

2024-02-15 Thread Django
#34060: Creating CheckConstraint on JSONField with __exact lookup on key 
transforms
crashes on Oracle.
-+-
 Reporter:  Mariusz Felisiak |Owner:  raydeal
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  4.0
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  Oracle   | 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:"0d8fbe2ade29f1b7bd9e6ba7a0281f5478603a43" 0d8fbe2a]:
 {{{#!CommitTicketReference repository=""
 revision="0d8fbe2ade29f1b7bd9e6ba7a0281f5478603a43"
 Refs #34060 -- Fixed crash when filtering against literal JSON with
 psycopg2.
 }}}
-- 
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/0107018db0cf8057-430e257f-71c9-43a8-9687-a70aceda5ef8-00%40eu-central-1.amazonses.com.


Re: [Django] #24018: Support setting pragma options for SQLite.

2024-02-15 Thread Django
#24018: Support setting pragma options for SQLite.
-+-
 Reporter:  Curtis Maloney   |Owner:  Aaron
 |  Linville
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (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

-- 
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/0107018db07bee2e-5e510922-5788-4674-abae-595689f1dfa5-00%40eu-central-1.amazonses.com.


Re: [Django] #35187: @sensitive_variables/sensitive_post_parameters decorators crash with .pyc-only builds.

2024-02-15 Thread Django
#35187: @sensitive_variables/sensitive_post_parameters decorators crash with 
.pyc-
only builds.
-+
 Reporter:  Marcus Hoffmann  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Core (Other) |  Version:  5.0
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+
Comment (by Marcus Hoffmann):

 Replying to [comment:7 Mariusz Felisiak]:
 > Great idea! Marcus, does it work for you?
 > {{{#!diff
 > diff --git a/django/views/decorators/debug.py
 b/django/views/decorators/debug.py
 > index 7ea8a540de..6540fc0651 100644
 > --- a/django/views/decorators/debug.py
 > +++ b/django/views/decorators/debug.py
 > @@ -47,7 +47,6 @@ def sensitive_variables(*variables):
 >
 >  try:
 >  file_path = inspect.getfile(wrapped_func)
 > -_, first_file_line =
 inspect.getsourcelines(wrapped_func)
 >  except TypeError:  # Raises for builtins or native
 functions.
 >  raise ValueError(
 >  f"{func.__name__} cannot safely be wrapped by "
 > @@ -55,7 +54,8 @@ def sensitive_variables(*variables):
 >  "Python file (not a builtin or from a native
 extension)."
 >  )
 >  else:
 > -key = hash(f"{file_path}:{first_file_line}")
 > +first_line_number =
 wrapped_func.__code__.co_firstlineno
 > +key = hash(f"{file_path}:{first_line_number}")
 >
 >  if variables:
 >  coroutine_functions_to_sensitive_variables[key] =
 variables
 >
 > }}}

 Thanks for the patch, I'll try and test this tomorrow!
-- 
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/0107018dae5c5e0e-056123f6-0f8f-4bda-ae70-6357c4995c04-00%40eu-central-1.amazonses.com.


Re: [Django] #34060: Creating CheckConstraint on JSONField with __exact lookup on key transforms crashes on Oracle.

2024-02-15 Thread Django
#34060: Creating CheckConstraint on JSONField with __exact lookup on key 
transforms
crashes on Oracle.
-+-
 Reporter:  Mariusz Felisiak |Owner:  raydeal
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  4.0
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  Oracle   | 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 ):

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

Comment:

 In [changeset:"c991602ce5798385261381025c06698d7fd30dc5" c991602c]:
 {{{#!CommitTicketReference repository=""
 revision="c991602ce5798385261381025c06698d7fd30dc5"
 Fixed #34060 -- Fixed migrations crash when adding check constraints with
 JSONField __exact lookup on Oracle.
 }}}
-- 
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/0107018dada149ef-fbcd5589-29ee-4f78-8ad2-635bb934c053-00%40eu-central-1.amazonses.com.


Re: [Django] #34917: Links in the Django admin should be underlined.

2024-02-15 Thread Django
#34917: Links in the Django admin should be underlined.
-+-
 Reporter:  Dmitriy Chukhin  |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  contrib.admin|  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:  accessibility,   | Triage Stage:  Accepted
  anchor |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  1
-+-
Changes (by Tom Carrick):

 * has_patch:  0 => 1
 * needs_better_patch:  0 => 1
 * stage:  Someday/Maybe => Accepted

-- 
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/0107018dad718ef7-c0afbc98-027f-4ab3-b2c0-a237a4ad6eb1-00%40eu-central-1.amazonses.com.


Re: [Django] #35199: Makemigrations raises KeyError when removing a field from Meta.unique_together when its a list

2024-02-15 Thread Django
#35199: Makemigrations raises KeyError when removing a field from
Meta.unique_together when its a list
-+-
 Reporter:  Paco Martínez|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Migrations   |  Version:  4.2
 Severity:  Normal   |   Resolution:  invalid
 Keywords:  migrations,  | Triage Stage:
  unique_together, makemigrations|  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Paco Martínez):

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


Old description:

> Having a model like this, with a **unique_together** with a **list of
> lists**:
>
> {{{
> from django.db import models
>
> class MyModel(models.Model):
> field1 = models.CharField(max_length=50)
> field2 = models.IntegerField()
> field3 = models.DateField()
>
> class Meta:
> unique_together=[['field1', 'field2', 'field3']]
> }}}
>

> If we want to remove one of the fields from the constraint like:
>
> {{{
> class Meta:
> unique_together=[['field1', 'field2']]
> }}}
>
> When we run the ''makemigrations'' command, it raises a KeyError. This is
> the traceback:
> {{{
> Traceback (most recent call last):
>   File "/code/manage.py", line 26, in 
> main()
>   File "/code/manage.py", line 22, in main
> execute_from_command_line(sys.argv)
>   File "/usr/local/lib/python3.12/site-
> packages/django/core/management/__init__.py", line 442, in
> execute_from_command_line
> utility.execute()
>   File "/usr/local/lib/python3.12/site-
> packages/django/core/management/__init__.py", line 436, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
>   File "/usr/local/lib/python3.12/site-
> packages/django/core/management/base.py", line 412, in run_from_argv
> self.execute(*args, **cmd_options)
>   File "/usr/local/lib/python3.12/site-
> packages/django/core/management/base.py", line 458, in execute
> output = self.handle(*args, **options)
>  ^
>   File "/usr/local/lib/python3.12/site-
> packages/django/core/management/base.py", line 106, in wrapper
> res = handle_func(*args, **kwargs)
>   
>   File "/usr/local/lib/python3.12/site-
> packages/django/core/management/commands/makemigrations.py", line 233, in
> handle
> changes = autodetector.changes(
>   ^
>   File "/usr/local/lib/python3.12/site-
> packages/django/db/migrations/autodetector.py", line 46, in changes
> changes = self._detect_changes(convert_apps, graph)
>   ^
>   File "/usr/local/lib/python3.12/site-
> packages/django/db/migrations/autodetector.py", line 192, in
> _detect_changes
> self.generate_removed_altered_unique_together()
>   File "/usr/local/lib/python3.12/site-
> packages/django/db/migrations/autodetector.py", line 1506, in
> generate_removed_altered_unique_together
> self._generate_removed_altered_foo_together(operations.AlterUniqueTogether)
>   File "/usr/local/lib/python3.12/site-
> packages/django/db/migrations/autodetector.py", line 1481, in
> _generate_removed_altered_foo_together
> for (
>   File "/usr/local/lib/python3.12/site-
> packages/django/db/migrations/autodetector.py", line 1462, in
> _get_altered_foo_together_operations
> field = new_model_state.get_field(field_name)
> ^
>   File "/usr/local/lib/python3.12/site-
> packages/django/db/migrations/state.py", line 765, in get_field
> return self.fields[field_name]
>~~~
> KeyError: 'field1'
>
> }}}
>
> This does NOT happen when the unique_together option is a **tuple**. It
> works as expected creating the migration.

New description:

 Having a model like this, with a **unique_together** with a **list of
 lists**:

 {{{
 from django.db import models

 class MyModel(models.Model):
 field1 = models.CharField(max_length=50)
 field2 = models.ForeignKey()
 field3 = models.ForeignKey()

 class Meta:
 unique_together=[['field1', 'field2', 'field3']]
 }}}


 If we want to remove one of the fields from the constraint like:

 {{{
 class Meta:
 unique_together=[['field1', 'field2']]
 }}}

 When we run the ''makemigrations'' command, it raises a KeyError. This is
 the traceback:
 {{{
 Traceback (most recent call last):
   File "/code/manage.py", line 26, in 
 main()
   File "/code/manage.py", line 22, in main
 execute_from_command_line(sys.argv)
   File 

[Django] #35199: Makemigrations raises KeyError when removing a field from Meta.unique_together when its a list

2024-02-15 Thread Django
#35199: Makemigrations raises KeyError when removing a field from
Meta.unique_together when its a list
-+-
   Reporter:  Paco   |  Owner:  nobody
  Martínez   |
   Type:  Bug| Status:  new
  Component: |Version:  4.2
  Migrations |   Keywords:  migrations,
   Severity:  Normal |  unique_together, makemigrations
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 Having a model like this, with a **unique_together** with a **list of
 lists**:

 {{{
 from django.db import models

 class MyModel(models.Model):
 field1 = models.CharField(max_length=50)
 field2 = models.IntegerField()
 field3 = models.DateField()

 class Meta:
 unique_together=[['field1', 'field2', 'field3']]
 }}}


 If we want to remove one of the fields from the constraint like:

 {{{
 class Meta:
 unique_together=[['field1', 'field2']]
 }}}

 When we run the ''makemigrations'' command, it raises a KeyError. This is
 the traceback:
 {{{
 Traceback (most recent call last):
   File "/code/manage.py", line 26, in 
 main()
   File "/code/manage.py", line 22, in main
 execute_from_command_line(sys.argv)
   File "/usr/local/lib/python3.12/site-
 packages/django/core/management/__init__.py", line 442, in
 execute_from_command_line
 utility.execute()
   File "/usr/local/lib/python3.12/site-
 packages/django/core/management/__init__.py", line 436, in execute
 self.fetch_command(subcommand).run_from_argv(self.argv)
   File "/usr/local/lib/python3.12/site-
 packages/django/core/management/base.py", line 412, in run_from_argv
 self.execute(*args, **cmd_options)
   File "/usr/local/lib/python3.12/site-
 packages/django/core/management/base.py", line 458, in execute
 output = self.handle(*args, **options)
  ^
   File "/usr/local/lib/python3.12/site-
 packages/django/core/management/base.py", line 106, in wrapper
 res = handle_func(*args, **kwargs)
   
   File "/usr/local/lib/python3.12/site-
 packages/django/core/management/commands/makemigrations.py", line 233, in
 handle
 changes = autodetector.changes(
   ^
   File "/usr/local/lib/python3.12/site-
 packages/django/db/migrations/autodetector.py", line 46, in changes
 changes = self._detect_changes(convert_apps, graph)
   ^
   File "/usr/local/lib/python3.12/site-
 packages/django/db/migrations/autodetector.py", line 192, in
 _detect_changes
 self.generate_removed_altered_unique_together()
   File "/usr/local/lib/python3.12/site-
 packages/django/db/migrations/autodetector.py", line 1506, in
 generate_removed_altered_unique_together
 self._generate_removed_altered_foo_together(operations.AlterUniqueTogether)
   File "/usr/local/lib/python3.12/site-
 packages/django/db/migrations/autodetector.py", line 1481, in
 _generate_removed_altered_foo_together
 for (
   File "/usr/local/lib/python3.12/site-
 packages/django/db/migrations/autodetector.py", line 1462, in
 _get_altered_foo_together_operations
 field = new_model_state.get_field(field_name)
 ^
   File "/usr/local/lib/python3.12/site-
 packages/django/db/migrations/state.py", line 765, in get_field
 return self.fields[field_name]
~~~
 KeyError: 'field1'

 }}}

 This does NOT happen when the unique_together option is a **tuple**. It
 works as expected creating the migration.
-- 
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/0107018dad21b182-984e42b2-7099-4071-b30c-3d6ce21240ec-00%40eu-central-1.amazonses.com.


Re: [Django] #28900: QuerySet.values() and values_list() for compound queries fails with annotation.

2024-02-15 Thread Django
#28900: QuerySet.values() and values_list() for compound queries fails with
annotation.
-+-
 Reporter:  elliott-omosheye |Owner:  ontowhee
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  1.11
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  union, values| Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by ontowhee):

 * owner:  (none) => ontowhee
 * status:  new => assigned

-- 
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/0107018dacfb8402-7dd09aa0-2e73-4676-a416-45e6e79b3137-00%40eu-central-1.amazonses.com.


Re: [Django] #34060: Creating CheckConstraint on JSONField with __exact lookup on key transforms crashes on Oracle.

2024-02-15 Thread Django
#34060: Creating CheckConstraint on JSONField with __exact lookup on key 
transforms
crashes on Oracle.
-+-
 Reporter:  Mariusz Felisiak |Owner:  raydeal
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  4.0
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  Oracle   | 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/0107018dacdb6812-cdab044b-9e98-43fa-a53b-8c0d5125c181-00%40eu-central-1.amazonses.com.


Re: [Django] #35198: Django Admin "Show counts" Feature Triggers Exception in a Custom Filter

2024-02-15 Thread Django
#35198: Django Admin "Show counts" Feature Triggers Exception in a Custom Filter
---+--
 Reporter:  Simon Alef |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  contrib.admin  |  Version:  5.0
 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
---+--
Changes (by Thomas Feldmann):

 * cc: Thomas Feldmann (added)

-- 
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/0107018daca2e0a6-703c53a9-ab22-4287-981a-e659611aeff5-00%40eu-central-1.amazonses.com.


Re: [Django] #35198: Django Admin "Show counts" Feature Triggers Exception in a Custom Filter

2024-02-15 Thread Django
#35198: Django Admin "Show counts" Feature Triggers Exception in a Custom Filter
---+--
 Reporter:  Simon Alef |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  contrib.admin  |  Version:  5.0
 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
---+--
Changes (by Simon Alef):

 * Attachment "django_bug_report.zip" added.

 Small reproducer
-- 
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/0107018dac996ff8-c3b3fff6-8996-45fd-aa5b-10c446c12eec-00%40eu-central-1.amazonses.com.


[Django] #35198: Django Admin "Show counts" Feature Triggers Exception in a Custom Filter

2024-02-15 Thread Django
#35198: Django Admin "Show counts" Feature Triggers Exception in a Custom Filter
-+
   Reporter:  Simon Alef |  Owner:  nobody
   Type:  Bug| Status:  new
  Component:  contrib.admin  |Version:  5.0
   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  |
-+
 Description:
 Our Django application defines a relational model where Customer entities
 have a one-to-many relationship with Contracts, and Contract entities have
 a one-to-many relationship with Rental Items. A custom admin filter
 (RentalItemsFilter) was implemented on the Customer model to enable
 filtering based on the presence of active Rental Items.

 Issue:
 Using the "show counts" feature within the RentalItemsFilter on the
 Customer admin page to display counts of devices (Rental Items) associated
 with each customer through contracts triggers an exception.

 Steps to Reproduce:
 Load fixtures from fixture.json
 Go to the Django admin dashboard and navigate to the Customer model
 section.
 Click on "Show counts".



 {{{
 Traceback:
 Request Method: GET
 Request URL: http://127.0.0.1:8000/admin/demo/customer/?_facets=True

 Django Version: 5.0.2
 Python Version: 3.11.7
 Installed Applications:
 ['django.contrib.admin',
  'django.contrib.auth',
  'django.contrib.contenttypes',
  'django.contrib.sessions',
  'django.contrib.messages',
  'django.contrib.staticfiles',
  'demo']
 Installed 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']


 Template error:
 In template /django_bug_report/.venv/lib/python3.11/site-
 packages/django/contrib/admin/templates/admin/change_list.html, error at
 line 87
no such column: demo_rentalitem.id
77 : {% translate 'Filter' %}
78 : {% if cl.is_facets_optional or cl.has_active_filters
 %}
79 :   {% if cl.is_facets_optional %}
80 : {% if cl.add_facets %}{% translate "Hide counts"
 %}
81 : {% else %}{% translate "Show counts" %}{% endif %}
82 :   {% endif %}
83 :   {% if cl.has_active_filters %}
84 : 
 {% translate "Clear all filters" %}
85 :   {% endif %}
86 : {% endif %}
87 : {% for spec in cl.filter_specs %} {% admin_list_filter
 cl spec %} {% endfor %}
88 :   
89 : {% endif %}
90 :   {% endblock %}
91 : 
92 :   
93 : {% endblock %}
94 :

 Traceback (most recent call last):
   File "/django_bug_report/.venv/lib/python3.11/site-
 packages/django/db/backends/utils.py", line 105, in _execute
 return self.cursor.execute(sql, params)

   File "/django_bug_report/.venv/lib/python3.11/site-
 packages/django/db/backends/sqlite3/base.py", line 329, in execute
 return super().execute(query, params)
^^

 The above exception (no such column: demo_rentalitem.id) was the direct
 cause of the following exception:
   File "/django_bug_report/.venv/lib/python3.11/site-
 packages/django/core/handlers/exception.py", line 55, in inner
 response = get_response(request)
^
   File "/django_bug_report/.venv/lib/python3.11/site-
 packages/django/core/handlers/base.py", line 220, in _get_response
 response = response.render()
^
   File "/django_bug_report/.venv/lib/python3.11/site-
 packages/django/template/response.py", line 114, in render
 self.content = self.rendered_content
^
   File "/django_bug_report/.venv/lib/python3.11/site-
 packages/django/template/response.py", line 92, in rendered_content
 return template.render(context, self._request)
^^^
   File "/django_bug_report/.venv/lib/python3.11/site-
 packages/django/template/backends/django.py", line 61, in render
 return self.template.render(context)
^
   File "/django_bug_report/.venv/lib/python3.11/site-
 packages/django/template/base.py", line 171, in render
 return self._render(context)
^
   File 

Re: [Django] #35173: DisallowedModelAdminLookup raised when filtering with __isnull on a ForeignKey not listed in list_filters

2024-02-15 Thread Django
#35173: DisallowedModelAdminLookup raised when filtering with __isnull on a
ForeignKey not listed in list_filters
-+-
 Reporter:  Stian Jensen |Owner:  Hisham
 |  Mahmood
 Type:  Bug  |   Status:  closed
Component:  contrib.admin|  Version:  5.0
 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 Natalia <124304+nessita@…>):

 In [changeset:"3a54e64ef7c14946dd072ddc2f4ab9551fe0" 3a54e64e]:
 {{{#!CommitTicketReference repository=""
 revision="3a54e64ef7c14946dd072ddc2f4ab9551fe0"
 [5.0.x] Fixed #35173 -- Fixed ModelAdmin.lookup_allowed() for lookups on
 foreign keys when not included in ModelAdmin.list_filter.

 Regression in f80669d2f5a5f1db9e9b73ca893fefba34f955e7.

 Thanks Sarah Boyce for the review.
 Backport of 8db593de05c3516c939b7d4b9eb91e8791f4c79a 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/0107018dac7e0522-df26e8cc-6bd9-4212-b520-9c7d639ed50c-00%40eu-central-1.amazonses.com.


Re: [Django] #35173: DisallowedModelAdminLookup raised when filtering with __isnull on a ForeignKey not listed in list_filters

2024-02-15 Thread Django
#35173: DisallowedModelAdminLookup raised when filtering with __isnull on a
ForeignKey not listed in list_filters
-+-
 Reporter:  Stian Jensen |Owner:  Hisham
 |  Mahmood
 Type:  Bug  |   Status:  closed
Component:  contrib.admin|  Version:  5.0
 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 Natalia Bidart):

 * 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/0107018dac7a69e7-78e73a3a-c73d-4a3d-a465-a10582c0b423-00%40eu-central-1.amazonses.com.


Re: [Django] #35197: floatformat combined with intcomma filters misformatting in Django 4.2.10

2024-02-15 Thread Django
#35197: floatformat combined with intcomma filters misformatting in Django 
4.2.10
-+-
 Reporter:  nathangeffen |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Template system  |  Version:  4.2
 Severity:  Normal   |   Resolution:  duplicate
 Keywords:  intcomma,| Triage Stage:
  floatformat|  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+-
Comment (by nathangeffen):

 Apologies. Missed the original bug. Thanks for fixing.
-- 
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/0107018dac761649-c8e3d908-ad9c-45dc-9d14-7ef3f148e29a-00%40eu-central-1.amazonses.com.


Re: [Django] #35197: floatformat combined with intcomma filters misformatting in Django 4.2.10

2024-02-15 Thread Django
#35197: floatformat combined with intcomma filters misformatting in Django 
4.2.10
-+-
 Reporter:  nathangeffen |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Template system  |  Version:  4.2
 Severity:  Normal   |   Resolution:  duplicate
 Keywords:  intcomma,| Triage Stage:
  floatformat|  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+-
Changes (by David Sanders):

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

Comment:

 Duplicate of #35172
-- 
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/0107018dac6fa4bd-c531198d-7700-4ffa-9d37-92d99ae17f7e-00%40eu-central-1.amazonses.com.


Re: [Django] #35197: floatformat combined with intcomma filters misformatting in Django 4.2.10

2024-02-15 Thread Django
#35197: floatformat combined with intcomma filters misformatting in Django 
4.2.10
-+-
 Reporter:  nathangeffen |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Template system  |  Version:  4.2
 Severity:  Normal   |   Resolution:
 Keywords:  intcomma,| Triage Stage:
  floatformat|  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+-
Description changed by nathangeffen:

Old description:

> A security bug was removed from the intcomma template filter in Django
> 4.2.10. But it appears a bug was introduced that misformats numbers when
> the intcomma filter is combined with floatformat.
> The problem is a leading comma is added to some numbers (I suspect it is
> numbers with exactly 3 digits).
>
> Example code that worked in 4.2.7 but now misformatting in 4.2.10:
> {{total_amount|floatformat:"2"|intcomma}}
>
> I have not filed a bug on this system before and hope to be able to
> attach screenshots.

New description:

 A security bug was removed from the intcomma template filter in Django
 4.2.10. But it appears a bug was introduced that misformats numbers when
 the intcomma filter is combined with floatformat.
 The problem is a leading comma is added to some numbers (I suspect it is
 numbers with exactly 3 digits).

 Example code that worked in 4.2.7 but now misformatting in 4.2.10:
 {{total_amount|floatformat:"2"|intcomma}}

 In the attached screenshots the bug is apparent. They are the same screen
 displayed using 4.2.7 and 4.2.10. Note the leading comma before 3 digit
 numbers in the one screenshot (that's 4.2.10).

--
-- 
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/0107018dac6e3752-705757eb-f61d-4047-ae82-d0a256b595cd-00%40eu-central-1.amazonses.com.


Re: [Django] #35197: floatformat combined with intcomma filters misformatting in Django 4.2.10

2024-02-15 Thread Django
#35197: floatformat combined with intcomma filters misformatting in Django 
4.2.10
-+-
 Reporter:  nathangeffen |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Template system  |  Version:  4.2
 Severity:  Normal   |   Resolution:
 Keywords:  intcomma,| Triage Stage:
  floatformat|  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+-
Changes (by nathangeffen):

 * Attachment "Screenshot 2024-02-15 at 12-58-45 Invoices GroundUp.png"
 added.

-- 
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/0107018dac6cc502-7140d8b0-452d-44a4-a2f9-bb32625489da-00%40eu-central-1.amazonses.com.


Re: [Django] #35197: floatformat combined with intcomma filters misformatting in Django 4.2.10

2024-02-15 Thread Django
#35197: floatformat combined with intcomma filters misformatting in Django 
4.2.10
-+-
 Reporter:  nathangeffen |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Template system  |  Version:  4.2
 Severity:  Normal   |   Resolution:
 Keywords:  intcomma,| Triage Stage:
  floatformat|  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+-
Changes (by nathangeffen):

 * Attachment "Screenshot 2024-02-15 at 12-59-39 Invoices GroundUp.png"
 added.

-- 
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/0107018dac6c95ce-1e3d3338-a701-41d6-ac1b-cd9e4888468f-00%40eu-central-1.amazonses.com.


[Django] #35197: floatformat combined with intcomma filters misformatting in Django 4.2.10

2024-02-15 Thread Django
#35197: floatformat combined with intcomma filters misformatting in Django 
4.2.10
-+-
   Reporter: |  Owner:  nobody
  nathangeffen   |
   Type:  Bug| Status:  new
  Component:  Template   |Version:  4.2
  system |   Keywords:  intcomma,
   Severity:  Normal |  floatformat
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  1  |
-+-
 A security bug was removed from the intcomma template filter in Django
 4.2.10. But it appears a bug was introduced that misformats numbers when
 the intcomma filter is combined with floatformat.
 The problem is a leading comma is added to some numbers (I suspect it is
 numbers with exactly 3 digits).

 Example code that worked in 4.2.7 but now misformatting in 4.2.10:
 {{total_amount|floatformat:"2"|intcomma}}

 I have not filed a bug on this system before and hope to be able to attach
 screenshots.
-- 
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/0107018dac696447-805d6842-e880-4c9c-ade3-91f764a7479d-00%40eu-central-1.amazonses.com.


Re: [Django] #33037: TruncDay error when using offset timezones on MySQL, SQLite, and Oracle.

2024-02-15 Thread Django
#33037: TruncDay error when using offset timezones on MySQL, SQLite, and Oracle.
-+-
 Reporter:  Alan |Owner:  Shafiya
 |  Adzhani
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  mysql truncdate  | Triage Stage:  Ready for
  timezone   |  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:"22285d366c9061a668003638613685f5a135a4c3" 22285d3]:
 {{{#!CommitTicketReference repository=""
 revision="22285d366c9061a668003638613685f5a135a4c3"
 Fixed #33037 -- Fixed Trunc() with offset timezones on MySQL, SQLite,
 Oracle.
 }}}
-- 
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/0107018dac409287-b50a09b5-f4f5-434b-898a-e0616910702e-00%40eu-central-1.amazonses.com.


Re: [Django] #7732: Oracle Backend with SessionPool

2024-02-15 Thread Django
#7732: Oracle Backend with SessionPool
-+-
 Reporter:  halturin |Owner:  Suraj
 |  Shaw
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  yandex-sprint| Triage Stage:  Accepted
  oracle session pool|
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * needs_better_patch:  0 => 1

-- 
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/0107018dac3de0cb-fb6b313c-ba6b-46cd-ad7b-19fc7bd00c81-00%40eu-central-1.amazonses.com.


Re: [Django] #35193: Range dumper assumes timezone aware datetimes.

2024-02-15 Thread Django
#35193: Range dumper assumes timezone aware datetimes.
-+-
 Reporter:  Mapiarz  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  4.2
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  invalid
 Keywords:  psycopg3 | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Comment (by Mapiarz):

 Thanks Mariusz.

 In the overriden dumper, is it ok to never cast to tstzrange like the
 built in dumper does? I'm not sure why that is needed in the first place
 and I don't want to break something with 'normal' (i.e. timezone aware)
 fields.
-- 
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/0107018dac2c338b-939502d1-1495-4d3b-bf8f-72f993cceb35-00%40eu-central-1.amazonses.com.


Re: [Django] #7732: Oracle Backend with SessionPool

2024-02-15 Thread Django
#7732: Oracle Backend with SessionPool
-+-
 Reporter:  halturin |Owner:  Suraj
 |  Shaw
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  yandex-sprint| Triage Stage:  Accepted
  oracle session pool|
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Suraj Shaw):

 * needs_better_patch:  1 => 0
 * has_patch:  0 => 1

-- 
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/0107018dac0d40da-559a1d77-7664-446a-b5cd-76ad8c16e875-00%40eu-central-1.amazonses.com.


Re: [Django] #33037: TruncDay error when using offset timezones on MySQL, SQLite, and Oracle.

2024-02-15 Thread Django
#33037: TruncDay error when using offset timezones on MySQL, SQLite, and Oracle.
-+-
 Reporter:  Alan |Owner:  Shafiya
 |  Adzhani
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  mysql truncdate  | Triage Stage:  Ready for
  timezone   |  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/0107018dac043bb7-0b13b1bf-00c6-4889-8d1f-0b2ffccd5575-00%40eu-central-1.amazonses.com.


Re: [Django] #35192: Support injecting custom context into widget templates

2024-02-15 Thread Django
#35192: Support injecting custom context into widget templates
-+-
 Reporter:  Oxan van Leeuwen |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Forms|  Version:  5.0
 Severity:  Normal   |   Resolution:  needsinfo
 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 David Smith):

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

Comment:

 >it's currently almost impossible to add an invalid CSS class to widgets
 that have errors.

 I agree that it is currently tricky to add invalid CSS to widgets
 (``) and would like to see this eased with Django itself. That was
 one of my conclusions when I attempted to write a tailwind styled form
 using just Django itself. See
 [https://smithdc.uk/blog/2023/bootstrap_form_in_vanilla_django/ blog
 post].

 I think there's a few different design options here, in addition to your
 suggestion above I see a couple of additional options.

 - A template filter/tag. This is the approach used by both django-widget-
 tweaks and django-crispy-forms.
 - Easing use of a custom `BoundField`. Currently you need to override each
 field's `get_bound_field()` to achieve this. Maybe this could also be set
 on the form renderer? This would also allow folk to make other
 customisations such as #35191 without adding a long list of options to the
 renderer.

 It's probably worth starting a discussion on the django forum to gain
 wider views from the community. I'm happy to help with this discussion. As
 I think we need a wider discussion on the design I'll mark as 'needsinfo'
 for now.
-- 
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/0107018dabe81c0f-26a6238e-45b9-451e-8d0a-24a626cfcfd6-00%40eu-central-1.amazonses.com.