Re: [Django] #35332: Bad performance in django.template.load.render_to_string

2024-03-25 Thread Django
#35332: Bad performance in django.template.load.render_to_string
-+-
 Reporter:  Zeyad Moustafa   |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Template system  |  Version:  5.0
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:  performance  | Triage Stage:
  templates jinja|  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * resolution:   => needsinfo
 * status:  new => closed
 * type:  Uncategorized => Cleanup/optimization

Comment:

 Hi, I don't think you've explained the issue in enough detail to confirm a
 bug in Django. Please reopen the ticket if you can debug your issue and
 provide details about why and where Django is at fault and what we could
 do better. Performance improvements are welcome, but you have to propose
 concrete things. You can start a discussion on the DevelopersMailingList,
 where you'll reach a wider audience and see what other think.
-- 
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/0107018e793ac29d-aa204743-2c72-4def-b758-abaa0c6bc252-00%40eu-central-1.amazonses.com.


Re: [Django] #35331: Adding a new related entry using the "+" sign from M2M field doesn't update lists. (was: When adding a new related entry using the "+" sign from M2M field, no other widgets get up

2024-03-25 Thread Django
#35331: Adding a new related entry using the "+" sign from M2M field doesn't 
update
lists.
---+--
 Reporter:  devin13cox |Owner:  devin13cox
 Type:  Bug|   Status:  assigned
Component:  contrib.admin  |  Version:  5.0
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  1  |UI/UX:  1
---+--
Changes (by Mariusz Felisiak):

 * stage:  Unreviewed => Accepted
 * summary:
 When adding a new related entry using the "+" sign from M2M field, no
 other widgets get updated.
 =>
 Adding a new related entry using the "+" sign from M2M field doesn't
 update lists.


Old description:

> Related to Ticket #34789, PR https://github.com/django/django/pull/17897
>
> Models:
>

> {{{
> from django.db import models
>

> class State(models.Model):
> label = models.CharField(max_length=255)
>
> def __str__(self):
> return self.label
>

> class Transition(models.Model):
> source = models.ManyToManyField(State,
> related_name="transition_source")
> target = models.ForeignKey(State, related_name="transition_target",
> on_delete=models.CASCADE)
> }}}
>
> Admin:
>

> {{{
> from django.contrib import admin
>
> from .models import State, Transition
>

> class TransitionAdmin(admin.ModelAdmin):
> filter_horizontal = ['source']
>

> admin.site.register(State)
> admin.site.register(Transition, TransitionAdmin)
> }}}
>
> Steps to Reproduce:
>
> Add a `State` via the "+" on the M2M field to add to the `Chosen Source`
> column. We would expect the dropdown for the `Target` to contain the new
> value, but it does not.
>
> Resolution as suggested by @nessita on the provided PR:
>
> "For this, I tracked down the issue to the selector used in
> dismissAddRelatedObjectPopup to decide whether to call
> updateRelatedSelectsOptions or not. Basically the id used in the
> document.getElementById is wrong for the M2M widget (but correct for the
> single FK field, so we may need to fix the call site to pass the proper
> name)"
>

> {{{
> --- a/django/contrib/admin/static/admin/js/admin/RelatedObjectLookups.js
> +++ b/django/contrib/admin/static/admin/js/admin/RelatedObjectLookups.js
> @@ -119,7 +119,7 @@
>
>  function dismissAddRelatedObjectPopup(win, newId, newRepr) {
>  const name = removePopupIndex(win.name);
> -const elem = document.getElementById(name);
> +const elem = document.getElementById(name + '_from');
>  if (elem) {
>  const elemName = elem.nodeName.toUpperCase();
>  if (elemName === 'SELECT') {
> }}}

New description:

 Related to Ticket #34789, PR https://github.com/django/django/pull/17897

 Models:


 {{{
 from django.db import models


 class State(models.Model):
 label = models.CharField(max_length=255)

 def __str__(self):
 return self.label


 class Transition(models.Model):
 source = models.ManyToManyField(State,
 related_name="transition_source")
 target = models.ForeignKey(State, related_name="transition_target",
 on_delete=models.CASCADE)
 }}}

 Admin:


 {{{
 from django.contrib import admin

 from .models import State, Transition


 class TransitionAdmin(admin.ModelAdmin):
 filter_horizontal = ['source']


 admin.site.register(State)
 admin.site.register(Transition, TransitionAdmin)
 }}}

 Steps to Reproduce:

 Add a `State` via the "+" on the M2M field to add to the `Chosen Source`
 column. We would expect the dropdown for the `Target` to contain the new
 value, but it does not.

 Resolution as suggested by @nessita on the provided PR:

 "For this, I tracked down the issue to the selector used in
 dismissAddRelatedObjectPopup to decide whether to call
 updateRelatedSelectsOptions or not. Basically the id used in the
 document.getElementById is wrong for the M2M widget (but correct for the
 single FK field, so we may need to fix the call site to pass the proper
 name)"


 {{{
 --- a/django/contrib/admin/static/admin/js/admin/RelatedObjectLookups.js
 +++ b/django/contrib/admin/static/admin/js/admin/RelatedObjectLookups.js
 @@ -119,7 +119,7 @@

  function dismissAddRelatedObjectPopup(win, newId, newRepr) {
  const name = removePopupIndex(win.name);
 -const elem = document.getElementById(name);
 +const elem = document.getElementById(name + '_from');
  if (elem) {
  const elemName = elem.nodeName.toUpperCase();
  if (elemName === 'SELECT') {
 }}}

--
-- 
Ticket URL: 
Django 
The Web framework for 

Re: [Django] #35330: The update of related objects fails in the admin when the related model is camel case. (was: The update of related objects fails in the admin when the related model has a name in

2024-03-25 Thread Django
#35330: The update of related objects fails in the admin when the related model 
is
camel case.
---+--
 Reporter:  devin13cox |Owner:  devin13cox
 Type:  Bug|   Status:  assigned
Component:  contrib.admin  |  Version:  5.0
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  1  |UI/UX:  1
---+--
Changes (by Mariusz Felisiak):

 * stage:  Unreviewed => Accepted
 * summary:
 The update of related objects fails in the admin when the related
 model has a name in camel case.
 =>
 The update of related objects fails in the admin when the related
 model is camel case.

Comment:

 Good catch.
-- 
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/0107018e79331598-44e04f9b-8d09-42bd-90b7-ff73e65c609f-00%40eu-central-1.amazonses.com.


[Django] #35332: Bad performance in django.template.load.render_to_string

2024-03-25 Thread Django
#35332: Bad performance in django.template.load.render_to_string
-+-
   Reporter:  Zeyad  |  Owner:  nobody
  Moustafa   |
   Type: | Status:  new
  Uncategorized  |
  Component:  Template   |Version:  5.0
  system |   Keywords:  performance
   Severity:  Normal |  templates jinja
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 Hi folks, thanks for your great job here.

 So with the rise of rust we are seeing, I told myself to make a component
 of Django components in rust so we can get a better performance as memory
 safety and all of these features from rust.

 While searching I discovered a great package called mini-jinja. so I just
 wanted to compare its performance with the Django template engine
 performance to figure out if what I am doing is good for the community or
 not. so here is the code I have written to know about the performance.


 {{{
 # mini-jinja.py
 from minijinja import Environment


 with open('test.html', 'r') as file:
 template = file.read()


 env = Environment(
 templates={
 'test': template
 }
 )

 result = env.render_template('test', nums=range(100))

 }}}

 and this is the result of the testing.

 {{{
 ❯ time python mini-jinja.py
 python mini-jinja.py  1.27s user 0.03s system 99% cpu 1.302 total

 dummy/python-tests/copper via  v3.10.12 (.venv)
 ❯ time python mini-jinja.py
 python mini-jinja.py  1.23s user 0.03s system 99% cpu 1.259 total
 }}}


 and this is how I tested it in django
 first created main.py file with this contents


 {{{
 import time
 from django.template.loader import render_to_string


 def render():
 start = time.time()
 _template = render_to_string("test.html", {"nums": range(100)})
 end = time.time()
 print(end - start)
 }}}

 and then I opened the django shell and imported the main file and then
 typed render and here is what I got


 {{{
 ❯ python manage.py shell
 Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux
 Type "help", "copyright", "credits" or "license" for more information.
 (InteractiveConsole)
 >>> import main
 >>> main.render()
 28.39499545097351
 >>>
 }}}
 and here is the test.html I was using for both the tests

 {{{
 {% for num in nums%}

 {{num}}

 {% endfor %}
 }}}

 So here is my question. why a big difference between both of them?? is
 there anything I have done wrong or this is related to the nature of
 python?? I just opened this issue to know if it will be really good for
 the Django community to create a template engine using rust built on top
 of Mini-jinja or if there is something I have to modify in my tests to get
 the real result??
-- 
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/0107018e78fbdc89-f94550f8-e5bd-41db-98cb-5ed26d06a30a-00%40eu-central-1.amazonses.com.


[Django] #35331: When adding a new related entry using the "+" sign from M2M field, no other widgets get updated.

2024-03-25 Thread Django
#35331: When adding a new related entry using the "+" sign from M2M field, no 
other
widgets get updated.
-+
   Reporter:  devin13cox |  Owner:  devin13cox
   Type:  Bug| Status:  assigned
  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:  1
  UI/UX:  1  |
-+
 Related to Ticket #34789, PR https://github.com/django/django/pull/17897

 Models:


 {{{
 from django.db import models


 class State(models.Model):
 label = models.CharField(max_length=255)

 def __str__(self):
 return self.label


 class Transition(models.Model):
 source = models.ManyToManyField(State,
 related_name="transition_source")
 target = models.ForeignKey(State, related_name="transition_target",
 on_delete=models.CASCADE)
 }}}

 Admin:


 {{{
 from django.contrib import admin

 from .models import State, Transition


 class TransitionAdmin(admin.ModelAdmin):
 filter_horizontal = ['source']


 admin.site.register(State)
 admin.site.register(Transition, TransitionAdmin)
 }}}

 Steps to Reproduce:

 Add a `State` via the "+" on the M2M field to add to the `Chosen Source`
 column. We would expect the dropdown for the `Target` to contain the new
 value, but it does not.

 Resolution as suggested by @nessita on the provided PR:

 "For this, I tracked down the issue to the selector used in
 dismissAddRelatedObjectPopup to decide whether to call
 updateRelatedSelectsOptions or not. Basically the id used in the
 document.getElementById is wrong for the M2M widget (but correct for the
 single FK field, so we may need to fix the call site to pass the proper
 name)"


 {{{
 --- a/django/contrib/admin/static/admin/js/admin/RelatedObjectLookups.js
 +++ b/django/contrib/admin/static/admin/js/admin/RelatedObjectLookups.js
 @@ -119,7 +119,7 @@

  function dismissAddRelatedObjectPopup(win, newId, newRepr) {
  const name = removePopupIndex(win.name);
 -const elem = document.getElementById(name);
 +const elem = document.getElementById(name + '_from');
  if (elem) {
  const elemName = elem.nodeName.toUpperCase();
  if (elemName === 'SELECT') {
 }}}
-- 
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/0107018e78be0d4f-fd3a5623-99a2-45f3-a610-5c318e7fb99c-00%40eu-central-1.amazonses.com.


[Django] #35330: The update of related objects fails in the admin when the related model has a name in camel case.

2024-03-25 Thread Django
#35330: The update of related objects fails in the admin when the related model 
has
a name in camel case.
-+
   Reporter:  devin13cox |  Owner:  devin13cox
   Type:  Bug| Status:  assigned
  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:  1
  UI/UX:  1  |
-+
 Related to Ticket #34789

 To reproduce, take these models:

 {{{
 class TransitionState(models.Model):
 label = models.CharField(max_length=255)

 def __str__(self):
 return self.label

 class Transition(models.Model):
 source = models.ManyToManyField(TransitionState,
 related_name="transition_source")
 target = models.ForeignKey(
 TransitionState, on_delete=models.CASCADE,
 related_name="transition_target"
 )

 }}}

 and this admin:


 {{{
 class TransitionAdmin(admin.ModelAdmin):
 filter_horizontal = ["source"]

 site.register(TransitionState)
 site.register(Transition, TransitionAdmin)
 }}}

 When we add a "Target", we expect the "available" source to be populated
 with the new target. However, due to the camel casing of TransitionState,
 we cause `data-model-ref` to check `transitionstate` against `transition
 state`, and therefore does not pick up the match.

 Proposed Change by @nessita as discussed in
 https://github.com/django/django/pull/17897:


 {{{

 diff --git
 a/django/contrib/admin/templates/admin/widgets/related_widget_wrapper.html
 b/django/contrib/admin/templates/admin/widgets/related_widget_wrapper.html
 index 8e4356a95c..99b20545af 100644
 ---
 a/django/contrib/admin/templates/admin/widgets/related_widget_wrapper.html
 +++
 b/django/contrib/admin/templates/admin/widgets/related_widget_wrapper.html
 @@ -1,5 +1,5 @@
  {% load i18n static %}
 -
 +
  {{ rendered_widget }}
  {% block links %}
  {% spaceless %}
 diff --git a/django/contrib/admin/widgets.py
 b/django/contrib/admin/widgets.py
 index fc0cd941d1..9633ebb1a1 100644
 --- a/django/contrib/admin/widgets.py
 +++ b/django/contrib/admin/widgets.py
 @@ -328,6 +328,7 @@ class RelatedFieldWidgetWrapper(forms.Widget):
  "name": name,
  "url_params": url_params,
  "model": rel_opts.verbose_name,
 +"model_name": rel_opts.model_name,
  "can_add_related": self.can_add_related,
  "can_change_related": self.can_change_related,
  "can_delete_related": self.can_delete_related,
 }}}
-- 
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/0107018e78b81c80-f1688a1d-6ff6-4aa9-9b11-a17ead8946a1-00%40eu-central-1.amazonses.com.


Re: [Django] #34643: Move admin form labels to a more accessible place

2024-03-25 Thread Django
#34643: Move admin form labels to a more accessible place
-+-
 Reporter:  Tom Carrick  |Owner:
 Type:   |  Hrushikesh Vaidya
  Cleanup/optimization   |   Status:  assigned
Component:  contrib.admin|  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:  accessibility| Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  1
-+-
Changes (by Hrushikesh Vaidya):

 * needs_docs:  1 => 0

-- 
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/0107018e78925963-29526861-edd5-4db5-8c9e-6d1ce60dcd98-00%40eu-central-1.amazonses.com.


Re: [Django] #35328: Improve CSRF Origin checking messaging

2024-03-25 Thread Django
#35328: Improve CSRF Origin checking messaging
--+
 Reporter:  Ryan Hiebert  |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  assigned
Component:  CSRF  |  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
--+
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/0107018e7770d35f-beda6ab0-dad9-4068-b4f6-a2567b454fdd-00%40eu-central-1.amazonses.com.


Re: [Django] #35329: Bug UniqueConstraint with condition and nulls-distinct

2024-03-25 Thread Django
#35329: Bug UniqueConstraint with condition and nulls-distinct
-+-
 Reporter:  lsaunitti|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  5.0
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:  nulls-distinct,  | Triage Stage:  Accepted
  condition, UniqueConstraint|
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Simon Charette):

 * cc: Simon Charette (added)
 * component:  Error reporting => Database layer (models, ORM)
 * keywords:  nulls-distinct, condition, UniqueConstrain => nulls-distinct,
 condition, UniqueConstraint
 * owner:  (none) => nobody
 * severity:  Normal => Release blocker
 * stage:  Unreviewed => Accepted


Old description:

> Hi, I`m Lucas (https://github.com/lsaunitti)
>
> I found a bug when set a UniqueConstrain using condition using
> nulls_distinct using like that:
>
> Screenshot 2024-03-25 at 10.47.59.png
>
> When django generate SQL to create a check constraint the result is "...
> WHERE  NULLS NOT DISTINCT".
> It raise an exception on Postgresql.
>
> To fix it, I suggest change the file django/db/backends/base/schema.py on
> line 132:
>
> Today:
> sql_create_unique_index = (
> "CREATE UNIQUE INDEX %(name)s ON %(table)s "
> "(%(columns)s)%(include)s%(condition)s%(nulls_distinct)s"
> )
>
> To:
> sql_create_unique_index = (
> "CREATE UNIQUE INDEX %(name)s ON %(table)s "
> "(%(columns)s)%(include)s%(nulls_distinct)s%(condition)s"
> )
>
> Regards,
> Lucas Lemke Saunitti
> Software Engineer

New description:

 Hi, I`m Lucas (https://github.com/lsaunitti)

 I found a bug when set a UniqueConstrain using condition using
 nulls_distinct using like that:

 Screenshot 2024-03-25 at 10.47.59.png

 When django generate SQL to create a check constraint the result is `...
 WHERE  NULLS NOT DISTINCT`.
 It raise an exception on Postgresql.

 To fix it, I suggest change the file django/db/backends/base/schema.py on
 line 132:

 Today:

 {{{#!python
 sql_create_unique_index = (
 "CREATE UNIQUE INDEX %(name)s ON %(table)s "
 "(%(columns)s)%(include)s%(condition)s%(nulls_distinct)s"
 )
 }}}

 To:
 {{{#!python
 sql_create_unique_index = (
 "CREATE UNIQUE INDEX %(name)s ON %(table)s "
 "(%(columns)s)%(include)s%(nulls_distinct)s%(condition)s"
 )
 }}}

 Regards,
 Lucas Lemke Saunitti
 Software Engineer

--
Comment:

 Thank you for your report Lucas!

 Marking as a release blocker since `nulls_distinct` is a new feature
 introduced in Django 5.0.

 [https://www.postgresql.org/docs/current/sql-createindex.html The Postgres
 docs] clearly point that `NULLS DISTINCT` should come before `WHERE`,
 sorry for missing that.

 Would you be interested in submitting a PR with the proposed changes?
 Adding a test should be as simple as taking inspiration from the ones
 [https://github.com/django/django/pull/17058/files#diff-
 40b7bac727110526783c1fd39a2b6026c9e01862b7e50b21fa89e9a3591bd2d7R3321-R3343
 introduced when the feature was 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/0107018e773a92fe-6c273710-dc61-490b-84d9-56f5025d0a9a-00%40eu-central-1.amazonses.com.


[Django] #35329: Bug UniqueConstraint with condition and nulls-distinct

2024-03-25 Thread Django
#35329: Bug UniqueConstraint with condition and nulls-distinct
-+-
   Reporter:  lsaunitti  |  Owner:  (none)
   Type:  Bug| Status:  new
  Component:  Error  |Version:  5.0
  reporting  |   Keywords:  nulls-distinct,
   Severity:  Normal |  condition, UniqueConstrain
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 Hi, I`m Lucas (https://github.com/lsaunitti)

 I found a bug when set a UniqueConstrain using condition using
 nulls_distinct using like that:

 Screenshot 2024-03-25 at 10.47.59.png

 When django generate SQL to create a check constraint the result is "...
 WHERE  NULLS NOT DISTINCT".
 It raise an exception on Postgresql.

 To fix it, I suggest change the file django/db/backends/base/schema.py on
 line 132:

 Today:
 sql_create_unique_index = (
 "CREATE UNIQUE INDEX %(name)s ON %(table)s "
 "(%(columns)s)%(include)s%(condition)s%(nulls_distinct)s"
 )

 To:
 sql_create_unique_index = (
 "CREATE UNIQUE INDEX %(name)s ON %(table)s "
 "(%(columns)s)%(include)s%(nulls_distinct)s%(condition)s"
 )

 Regards,
 Lucas Lemke Saunitti
 Software Engineer
-- 
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/0107018e770c039a-b8d8b3c1-60f7-41a7-9962-6eaf55c8213f-00%40eu-central-1.amazonses.com.


Re: [Django] #35328: Improve CSRF Origin checking messaging

2024-03-25 Thread Django
#35328: Improve CSRF Origin checking messaging
--+
 Reporter:  Ryan Hiebert  |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  assigned
Component:  CSRF  |  Version:  dev
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Natalia Bidart):

 * cc: Carlton Gibson, tim-schilling (added)
 * stage:  Unreviewed => Accepted
 * type:  New feature => Cleanup/optimization

Comment:

 Accepting following the linked Forum discussion.
-- 
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/0107018e762799bb-69fbaccd-6b2d-426a-a02a-b4284a4e7712-00%40eu-central-1.amazonses.com.


Re: [Django] #35326: OverwritingStorageTests fail if a TemporaryUploadedFile is used

2024-03-25 Thread Django
#35326: OverwritingStorageTests fail if a TemporaryUploadedFile is used
--+
 Reporter:  bcail |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  File uploads/storage  |  Version:  dev
 Severity:  Normal|   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 bcail):

 Thanks, @Natalia. I opened a new
 [https://forum.djangoproject.com/t/issue-35326-overwritingstoragetests-
 design-discussion/29462 forum post].
-- 
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/0107018e76063728-35d2bfd7-f860-42a3-9a45-d6094ef00461-00%40eu-central-1.amazonses.com.


Re: [Django] #35326: OverwritingStorageTests fail if a TemporaryUploadedFile is used

2024-03-25 Thread Django
#35326: OverwritingStorageTests fail if a TemporaryUploadedFile is used
--+
 Reporter:  bcail |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  File uploads/storage  |  Version:  dev
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Natalia Bidart):

 * cc: Tim Graham (added)
 * stage:  Unreviewed => Accepted

Comment:

 Hello bcail, thank you for your report!

 This definitely seems like a valid issue, `file_move_safe` (from
 `django.core.files.move`) requires the `allow_overwrite` flag to be passed
 to perform overwrites. I don't have clarity on the possible fix, I agree
 that it requires a design decision. A forum post seeking advice would be
 the best next step, I think.
-- 
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/0107018e75fbc667-edce6216-4fee-40c2-9794-d43f11a15070-00%40eu-central-1.amazonses.com.


Re: [Django] #35306: Improve documentation for the various date format settings

2024-03-25 Thread Django
#35306: Improve documentation for the various date format settings
-+-
 Reporter:  Richard  |Owner:  Lufafa
 Type:   |  Joshua
  Cleanup/optimization   |   Status:  assigned
Component:   |  Version:  5.0
  Internationalization   |
 Severity:  Normal   |   Resolution:
 Keywords:  LANGUAGE_CODE,   | Triage Stage:  Accepted
  DATE_FORMAT|
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Comment (by Natalia Bidart):

 Replying to [comment:11 Claude Paroz]:
 > Replying to [comment:6 Natalia Bidart]:
 > > (Another data point: even using `{% localize off %}` does not honor
 the settings values. This feels unexpected to me...)
 >
 > Are you sure? This [https://github.com/claudep/django/commit/57f9982
 passing test] seems to show the contrary. Could you double-check?

 I am sure, but with a caveat :-)
 I have double checked and in my manual tests, I was explicitly passing the
 `|date` template filter. So, basically, if we add this case to your test
 (I renamed your original `date` to `my_date` for clarity):

 {{{#!python
 date_plus_tag_template = Template(
 "{% load l10n %}Localized: {{ my_date|date }}. {% localize off
 %}Unlocalized: "
 "{{ my_date|date }}{% endlocalize %}."
 )
 }}}

 There is this test failure:

 {{{
 AssertionError: 'Localized: 15. Dezember 2024. Unlocalized: 15. Dezember
 2024.' != 'Localized: 15. Dezember 2024. Unlocalized: 15-12-2024.'
 }}}

 Using `my_date|date:'DATE_FORMAT'` also makes the test fails. For example,
 a valid use case for explicitly wanting to pipe `date` to a given context
 provided date would be to truncate a datetime 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/0107018e75c06fac-6f09ade5-5455-4e83-9774-927d07874a42-00%40eu-central-1.amazonses.com.


Re: [Django] #35326: OverwritingStorageTests fail if a TemporaryUploadedFile is used

2024-03-25 Thread Django
#35326: OverwritingStorageTests fail if a TemporaryUploadedFile is used
-+-
 Reporter:  bcail|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  File |  Version:  dev
  uploads/storage|
 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 bcail):

 @alexialg05, yes, you can assign yourself to this issue, but we should
 probably see if others confirm this as an issue. If it is confirmed as an
 issue, there may be design questions to figure out.
-- 
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/0107018e7593235c-fd08f9e2-600f-4d20-aa1b-bbcdcda4a007-00%40eu-central-1.amazonses.com.


Re: [Django] #32779: Add tablespace support to UniqueConstraint class

2024-03-25 Thread Django
#32779: Add tablespace support to UniqueConstraint class
-+-
 Reporter:  Hannes Ljungberg |Owner:  (none)
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 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
-+-
Changes (by Mariusz Felisiak):

 * owner:  Hannes Ljungberg => (none)
 * status:  assigned => new

-- 
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/0107018e75775d68-5eb4419f-8131-4ff7-9bc6-c6d386d792fb-00%40eu-central-1.amazonses.com.


Re: [Django] #11593: Incomplete support for app-level testing

2024-03-25 Thread Django
#11593: Incomplete support for app-level testing
---+
 Reporter:  Masklinn   |Owner:  (none)
 Type:  New feature|   Status:  new
Component:  Testing framework  |  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
---+
Changes (by Mariusz Felisiak):

 * owner:  Raphael Kimmig => (none)
 * status:  assigned => new

-- 
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/0107018e7576edf6-90dde2bf-3b8e-484b-9693-12037b773c69-00%40eu-central-1.amazonses.com.


Re: [Django] #32568: Prefer SafeString to mark_safe where possible

2024-03-25 Thread Django
#32568: Prefer SafeString to mark_safe where possible
--+
 Reporter:  Tim McCurrach |Owner:  (none)
 Type:  Cleanup/optimization  |   Status:  new
Component:  Template system   |  Version:  dev
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Mariusz Felisiak):

 * owner:  Tim McCurrach => (none)
 * status:  assigned => new

-- 
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/0107018e75734d01-88f3f20f-25c3-459b-a999-a116d95d8f52-00%40eu-central-1.amazonses.com.


Re: [Django] #23356: Unable to create template tag which behaves similar to {% verbatim %}

2024-03-25 Thread Django
#23356: Unable to create template tag which behaves similar to {% verbatim %}
--+
 Reporter:  Jacob Rief|Owner:  (none)
 Type:  Cleanup/optimization  |   Status:  new
Component:  Template system   |  Version:  dev
 Severity:  Normal|   Resolution:
 Keywords:  verbatim  | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Mariusz Felisiak):

 * owner:  Atul Bhouraskar => (none)
 * status:  assigned => new

-- 
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/0107018e75729a9e-4842617d-16bf-4a5b-a207-3f34d24ceef0-00%40eu-central-1.amazonses.com.


Re: [Django] #29898: Adapt schema editors to operate from model states instead of fake rendered models

2024-03-25 Thread Django
#29898: Adapt schema editors to operate from model states instead of fake 
rendered
models
--+
 Reporter:  Simon Charette|Owner:  (none)
 Type:  Cleanup/optimization  |   Status:  new
Component:  Migrations|  Version:  dev
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Mariusz Felisiak):

 * owner:  Manav Agarwal => (none)
 * status:  assigned => new

-- 
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/0107018e757236f4-1b3daa78-82dd-43ff-9c46-af1e3ae6ba1a-00%40eu-central-1.amazonses.com.


Re: [Django] #28944: Chaining values()/values_list() after QuerySet.select_for_update(of=()) crashes

2024-03-25 Thread Django
#28944: Chaining values()/values_list() after QuerySet.select_for_update(of=())
crashes
-+-
 Reporter:  Thierry Bastian  |Owner:  (none)
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 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
-+-
Changes (by Mariusz Felisiak):

 * owner:  Chetan Khanna => (none)
 * status:  assigned => new

-- 
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/0107018e755d3a7d-85ddb94c-fb6e-4df7-a99c-0507a0ba1176-00%40eu-central-1.amazonses.com.


Re: [Django] #9373: "This field is required" error even on empty inlines formsets in the admin model page, when hiding a choice field of a custom form.

2024-03-25 Thread Django
#9373: "This field is required" error even on empty inlines formsets in the 
admin
model page, when hiding a choice field of a custom form.
+
 Reporter:  tyrion.mx@… |Owner:  (none)
 Type:  Bug |   Status:  new
Component:  contrib.admin   |  Version:  1.7
 Severity:  Normal  |   Resolution:
 Keywords:  admin, inlines  | Triage Stage:  Accepted
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+
Changes (by Mariusz Felisiak):

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

-- 
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/0107018e755422c3-cd6e9ed4-36a0-4ff6-87b9-ffbf20e8711e-00%40eu-central-1.amazonses.com.


Re: [Django] #21739: When running tests fixture error output isn't visible

2024-03-25 Thread Django
#21739: When running tests fixture error output isn't visible
-+-
 Reporter:  camilo.lopez.a@… |Owner:  (none)
 Type:  Bug  |   Status:  new
Component:  Testing framework|  Version:  1.6
 Severity:  Normal   |   Resolution:
 Keywords:  test fixture | Triage Stage:  Accepted
  verbosity  |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

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

-- 
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/0107018e7552224b-2837162c-acd0-44e3-b7bb-56d99db44b64-00%40eu-central-1.amazonses.com.


Re: [Django] #35276: Push cache backend checks down to backend classes

2024-03-25 Thread Django
#35276: Push cache backend checks down to backend classes
--+
 Reporter:  Adam Johnson  |Owner:  Almaz
 Type:  Cleanup/optimization  |   Status:  assigned
Component:  Core (System checks)  |  Version:  dev
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  1
  Needs tests:  1 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Mariusz Felisiak):

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

Comment:

 [https://github.com/django/django/pull/18008 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/0107018e749f2e25-9f78948a-3a65-4a2c-851d-40fa1b0938a7-00%40eu-central-1.amazonses.com.