Re: [Django] #34791: Issue when using Prefetch objects in prefetch_related

2023-08-23 Thread Django
#34791: Issue when using Prefetch objects in prefetch_related
-+-
 Reporter:  Maxime Toussaint |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  4.2
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  prefetch,| Triage Stage:
  prefetch_related   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Mariusz Felisiak):

 > I did follow the code a bit yesterday, and I believe it comes from the
 fact that the ForeignKey field defines the cache name as being simply the
 name of the field. I am not certain though, and it would likely require
 someone with more knowledge than me to look into it.

 As far as I'm aware this is an expected behavior, subsequent lookups in
 `prefetch_related()` affect each other, see
 
[https://docs.djangoproject.com/en/stable/ref/models/querysets/#django.db.models.query.QuerySet.prefetch_related
 docs]:
 > ''"The ordering of lookups matters."''
 You prefetched `toppings__origin` with a default queryset, so the second
 `Prefetch()` ignores a custom queryset on the same relation. You should
 use `Prefetch(..., to_attr="")` in both cases to have two independent
 queries.

 In such cases, we may consider raising `ValueError`.

-- 
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/0107018a25c68b88-b01e28fc-a046-4da4-9be9-d72b297fd4ab-00%40eu-central-1.amazonses.com.


Re: [Django] #34709: charset should be ignored for the application/x-www-form-urlencoded content type.

2023-08-23 Thread Django
#34709: charset should be ignored for the application/x-www-form-urlencoded 
content
type.
-+-
 Reporter:  Mariusz Felisiak |Owner:  Mariusz
 |  Felisiak
 Type:  Bug  |   Status:  assigned
Component:  HTTP handling|  Version:  4.2
 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):

 * cc: Shai Berger (added)


Comment:

 Replying to [comment:15 Claude Paroz]:
 > While starting to review the patch, and looking for more recent
 considerations than the old 1866 RFC, I read
 https://url.spec.whatwg.org/#application/x-www-form-urlencoded which is
 worth a read. Quoting a note:
 >
 > `A legacy server-oriented implementation might have to support encodings
 other than UTF-8 as well as have special logic for tuples of which the
 name is ``_charset``. Such logic is not described here as only UTF-8 is
 conforming.`
 >
 > I don't necessarily re-question our previous discussions/decisions,
 however we might be prepared to receive some complaints as it may be that
 non-conforming agents start to produce BadRequest errors. Difficult to say
 before going to production!

 Unfortunately, I don't see a way to support this with a loud crash at the
 same time.

-- 
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/0107018a259c151f-113372f0-b436-4d57-9566-574618dfb78a-00%40eu-central-1.amazonses.com.


Re: [Django] #34795: ConnectionProxy (and likely others) do not expose the `__dir__` of the object they are proxying

2023-08-23 Thread Django
#34795: ConnectionProxy (and likely others) do not expose the `__dir__` of the
object they are proxying
--+--
 Reporter:  Willem Van Onsem  |Owner:  nobody
 Type:  Uncategorized |   Status:  closed
Component:  Core (Other)  |  Version:  4.2
 Severity:  Normal|   Resolution:  wontfix
 Keywords:| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  1 |UI/UX:  0
--+--
Changes (by Natalia Bidart):

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


Comment:

 Hello, thank you for your ticket.

 I don't see much value in providing this vs the potential side effects of
 calling `dir` on the proxied connection.

 If you disagree, the recommended path forward in cases like this is to
 first propose and discuss the idea with the community and gain consensus.
 To do that, please start a new conversation on the
 [https://forum.djangoproject.com/c/internals/5 Django Forum], where you'll
 reach a wider audience and likely get richer feedback.

 I'll close the ticket for now, but once that there is a community
 agreement for the feature request, you are welcome to come back to the
 ticket and point to the forum topic, so we can then re-open it. For more
 details, please see
 [https://docs.djangoproject.com/en/stable/internals/contributing/bugs-and-
 features/#requesting-features the documented guidelines for requesting
 features].

 Thanks!

-- 
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/0107018a2540722b-7ddbf9bc-7461-4f5f-b87e-8ca834d3f5f3-00%40eu-central-1.amazonses.com.


Re: [Django] #34791: Issue when using Prefetch objects in prefetch_related

2023-08-23 Thread Django
#34791: Issue when using Prefetch objects in prefetch_related
-+-
 Reporter:  Maxime Toussaint |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  4.2
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  prefetch,| Triage Stage:
  prefetch_related   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Maxime Toussaint):

 Reopened because I managed to create a test that shows the issue.

-- 
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/0107018a23f6f106-e7969a22-3138-441e-a567-2caf10196669-00%40eu-central-1.amazonses.com.


Re: [Django] #34791: Issue when using Prefetch objects in prefetch_related

2023-08-23 Thread Django
#34791: Issue when using Prefetch objects in prefetch_related
-+-
 Reporter:  Maxime Toussaint |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  4.2
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  prefetch,| Triage Stage:
  prefetch_related   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Description changed by Maxime Toussaint:

Old description:

> There seems to be an issue when using a Prefetch object to fetch
> something that has already been fetched. Here is an example: so let's say
> I have a Pizza and some Toppings. Now I want to get all the toppings, but
> for some reason I also want to separately fetch only the toppings that
> are out of stock. I could do something like:
>

> {{{
> queryset = Pizza.objects.all().prefetch_related(
> 'toppings',
> Prefetch('toppings',
> queryset=Topping.objects.filter(is_in_stock=False),
> to_attr='out_of_stock_toppings'),
> )
> }}}
>
> This looks good, but if we run it, it will fail, saying
> out_of_stock_toppings is not an attribute of Pizza. However, if I were to
> do it like this instead:
> {{{
> queryset = Pizza.objects.all().prefetch_related(
> Prefetch('toppings',
> queryset=Topping.objects.filter(is_in_stock=False),
> to_attr='out_of_stock_toppings'),
> 'toppings',
> )
> }}}
>
> then all works fine. Looking at the code, this seems to be because the
> name used by a field to validate the cache is not the name used to store
> the data on the model, but rather simply the name of the field, so it
> collides. I have not tested it, but I think in the second example, the
> data returned will actually be the filtered data, not the full expected
> queryset. Note that this is my first time reading that part of the code,
> so there could be things I missed.
>
> Now this is a bit of a nonsensical example, but when using rest_framework
> with serializers, this type of situation could come up, where one
> serializer needs it formatted a certain way and this issue could arise
> (it has for me).
>
> I am not sure what the best way to fix this would be, but I feel like
> setting a to_attr should make the cache take that new field name into
> account instead of the field name.

New description:

 Note: Edited the description following the discussion

 There seems to be an issue when using a Prefetch object to fetch something
 that has already been fetched. The issue only seems to happen when there
 is depth in the prefetch. Here is an example I made this morning that
 fails:
 {{{
 pizzas = Pizza.objects.all().prefetch_related(
 "toppings__origin",
 Prefetch(
 "toppings__origin",
 queryset=Country.objects.filter(label="China"),
 to_attr="china",
 ),
 )

 china = pizzas[0].toppings.all()[0].china
 }}}
 Here, when trying to get china, I would assume it to either be a Country
 object or None. However, I get the message: AttributeError: 'Topping'
 object has no attribute 'china'

 Here are the models I set up for my test:
 {{{
 class Country(models.Model):
 label = models.CharField(max_length=50)


 class Pizza(models.Model):
 label = models.CharField(max_length=50)


 class Topping(models.Model):
 pizza = models.ForeignKey(Pizza, on_delete=models.CASCADE,
 related_name="toppings")
 label = models.CharField(max_length=50)
 origin = models.ForeignKey(
 Country, on_delete=models.CASCADE, related_name="toppings"
 )
 }}}
 And here are the queries made when calling the queryset:
 {{{
 1. SELECT "tests_pizza"."id", "tests_pizza"."label",
 "tests_pizza"."provenance_id" FROM "tests_pizza"
 2. SELECT "tests_topping"."id", "tests_topping"."pizza_id",
 "tests_topping"."label", "tests_topping"."origin_id" FROM "tests_topping"
 WHERE "tests_topping"."pizza_id" IN (1, 2)
 3. SELECT "tests_country"."id", "tests_country"."label",
 "tests_country"."continent_id" FROM "tests_country" WHERE
 "tests_country"."id" IN (2, 3, 4)
 }}}
 Note that the filter by label='china' has completely disappeared.

 Now, if I switch the prefetches around like so:
 {{{
 pizzas = Pizza.objects.all().prefetch_related(
 Prefetch(
 "toppings__origin",
 queryset=Country.objects.filter(label="China"),
 to_attr="china",
 ),
 "toppings__origin",
 )
 }}}
 Fetching china now works, and here are the queries being made:
 {{{
 1. 

Re: [Django] #34791: Issue when using Prefetch objects in prefetch_related

2023-08-23 Thread Django
#34791: Issue when using Prefetch objects in prefetch_related
-+-
 Reporter:  Maxime Toussaint |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  4.2
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  prefetch,| Triage Stage:
  prefetch_related   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Maxime Toussaint):

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


-- 
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/0107018a23f3eaa0-332add16-f485-4575-b3d1-f07502026070-00%40eu-central-1.amazonses.com.


Re: [Django] #34789: `filter_horizontal` duplicates entries in "Chosen" column after instance is added via in another field using the "plus" JS action

2023-08-23 Thread Django
#34789: `filter_horizontal` duplicates entries in "Chosen" column after 
instance is
added via in another field using the "plus" JS action
---+
 Reporter:  devin13cox |Owner:  (none)
 Type:  Bug|   Status:  assigned
Component:  contrib.admin  |  Version:  4.2
 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 devin13cox):

 * owner:  nobody => (none)
 * 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/0107018a235ec2a8-6a5f3bac-aa69-41a7-a42d-050ddb2b4ffc-00%40eu-central-1.amazonses.com.


[Django] #34795: ConnectionProxy (and likely others) do not expose the `__dir__` of the object they are proxying

2023-08-23 Thread Django
#34795: ConnectionProxy (and likely others) do not expose the `__dir__` of the
object they are proxying
+
   Reporter:  Willem Van Onsem  |  Owner:  nobody
   Type:  Uncategorized | Status:  new
  Component:  Core (Other)  |Version:  4.2
   Severity:  Normal|   Keywords:
   Triage Stage:  Unreviewed|  Has patch:  0
Needs documentation:  0 |Needs tests:  0
Patch needs improvement:  0 |  Easy pickings:  1
  UI/UX:  0 |
+
 Based on this question: https://stackoverflow.com/q/76963171/67579 the
 `ConnectionProxy` does not communicate the `__dir__` of the object it is
 exposing. As a result, shells, etc. can not help with code completion.

 Overriding `__dir__` and returning the `dir(..)` of the items it exposes
 is however quite easy.

-- 
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/0107018a233f6cdf-f93a5f1d-acd4-4505-9a9b-0aafb53421a0-00%40eu-central-1.amazonses.com.


Re: [Django] #34784: Django french short date format translation bug

2023-08-23 Thread Django
#34784: Django french short date format translation bug
-+-
 Reporter:  Olivier Pons |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:   |  Version:  4.2
  Internationalization   |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
  translation,french,date|
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Claude Paroz):

 * has_patch:  0 => 1


Comment:

 [https://github.com/django/django/pull/17187 Suggested PR]. This would
 need confirmation by Belgian/Canadian French speakers.

-- 
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/0107018a230565ef-7b48691d-6d18-48d2-89be-18ce2fd32ef0-00%40eu-central-1.amazonses.com.


Re: [Django] #34757: AsyncClient should follow redirects

2023-08-23 Thread Django
#34757: AsyncClient should follow redirects
-+-
 Reporter:  Mike Lissner |Owner:  Olivier
 |  Tabone
 Type:  New feature  |   Status:  assigned
Component:  Testing framework|  Version:  4.2
 Severity:  Normal   |   Resolution:
 Keywords:  async| Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Olivier Tabone):

 * needs_better_patch:  1 => 0


Comment:

 PR updated

-- 
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/0107018a229911ed-9a504566-d2dd-4b11-b57f-4288fc5c146c-00%40eu-central-1.amazonses.com.


Re: [Django] #34709: charset should be ignored for the application/x-www-form-urlencoded content type.

2023-08-23 Thread Django
#34709: charset should be ignored for the application/x-www-form-urlencoded 
content
type.
-+-
 Reporter:  Mariusz Felisiak |Owner:  Mariusz
 |  Felisiak
 Type:  Bug  |   Status:  assigned
Component:  HTTP handling|  Version:  4.2
 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 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/0107018a228c0140-c87884b1-c63b-43c8-8326-9661fca0d525-00%40eu-central-1.amazonses.com.


Re: [Django] #34791: Issue when using Prefetch objects in prefetch_related

2023-08-23 Thread Django
#34791: Issue when using Prefetch objects in prefetch_related
-+-
 Reporter:  Maxime Toussaint |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  4.2
  (models, ORM)  |   Resolution:
 Severity:  Normal   |  worksforme
 Keywords:  prefetch,| Triage Stage:
  prefetch_related   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Maxime Toussaint):

 Hi, thanks a lot for the quick answer. I seem to have misunderstood the
 parameters of my issue, and the example I gave does work for me. In trying
 to simplify it, I took out the part that was making it fail.

 So the issue only seems to happen when there is depth in the prefetch.
 Here is an example I made this morning that fails:

 {{{

 pizzas = Pizza.objects.all().prefetch_related(
 "toppings__origin",
 Prefetch(
 "toppings__origin",
 queryset=Country.objects.filter(label="China"),
 to_attr="china",
 ),
 )

 china = pizzas[0].toppings.all()[0].china
 }}}

 Here, when trying to get china, I would assume it to either be a Country
 object or None. However, I get the message: AttributeError: 'Topping'
 object has no attribute 'china'

 Here are the models I set up for my test:

 {{{
 class Country(models.Model):
 label = models.CharField(max_length=50)


 class Pizza(models.Model):
 label = models.CharField(max_length=50)


 class Topping(models.Model):
 pizza = models.ForeignKey(Pizza, on_delete=models.CASCADE,
 related_name="toppings")
 label = models.CharField(max_length=50)
 origin = models.ForeignKey(
 Country, on_delete=models.CASCADE, related_name="toppings"
 )
 }}}

 And here are the queries made when calling the queryset:
 {{{
 1. SELECT "tests_pizza"."id", "tests_pizza"."label",
 "tests_pizza"."provenance_id" FROM "tests_pizza"
 2. SELECT "tests_topping"."id", "tests_topping"."pizza_id",
 "tests_topping"."label", "tests_topping"."origin_id" FROM "tests_topping"
 WHERE "tests_topping"."pizza_id" IN (1, 2)
 3. SELECT "tests_country"."id", "tests_country"."label",
 "tests_country"."continent_id" FROM "tests_country" WHERE
 "tests_country"."id" IN (2, 3, 4)
 }}}

 Note that the filter by label='china' has completely disappeared.

 Now, if I switch the prefetches around like so:

 {{{
 pizzas = Pizza.objects.all().prefetch_related(
 Prefetch(
 "toppings__origin",
 queryset=Country.objects.filter(label="China"),
 to_attr="china",
 ),
 "toppings__origin",
 )
 }}}
 Fetching china now works, and here are the queries being made:

 {{{
 1. SELECT "tests_pizza"."id", "tests_pizza"."label",
 "tests_pizza"."provenance_id" FROM "tests_pizza"
 2. SELECT "tests_topping"."id", "tests_topping"."pizza_id",
 "tests_topping"."label", "tests_topping"."origin_id" FROM "tests_topping"
 WHERE "tests_topping"."pizza_id" IN (1, 2)
 3. SELECT "tests_country"."id", "tests_country"."label",
 "tests_country"."continent_id" FROM "tests_country" WHERE
 ("tests_country"."label" = 'China' AND "tests_country"."id" IN (2, 3, 4))
 4. SELECT "tests_country"."id", "tests_country"."label",
 "tests_country"."continent_id" FROM "tests_country" WHERE
 "tests_country"."id" IN (2, 3, 4)
 }}}

 This time, both calls to Country were made.

 I did follow the code a bit yesterday, and I believe it comes from the
 fact that the ForeignKey field defines the cache name as being simply the
 name of the field. I am not certain though, and it would likely require
 someone with more knowledge than me to look into it.

 Thanks again, hopefully we can figure out what is happening!

-- 
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/0107018a22777992-fa2247c0-3887-4d1b-a631-8d73f04bb5f6-00%40eu-central-1.amazonses.com.


Re: [Django] #34709: charset should be ignored for the application/x-www-form-urlencoded content type.

2023-08-23 Thread Django
#34709: charset should be ignored for the application/x-www-form-urlencoded 
content
type.
-+-
 Reporter:  Mariusz Felisiak |Owner:  Mariusz
 |  Felisiak
 Type:  Bug  |   Status:  assigned
Component:  HTTP handling|  Version:  4.2
 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
-+-

Comment (by Claude Paroz):

 While starting to review the patch, and looking for more recent
 considerations than the old 1866 RFC, I read
 https://url.spec.whatwg.org/#application/x-www-form-urlencoded which is
 worth a read. Quoting a note:

 `A legacy server-oriented implementation might have to support encodings
 other than UTF-8 as well as have special logic for tuples of which the
 name is ``_charset``. Such logic is not described here as only UTF-8 is
 conforming.`

 I don't necessarily re-question our previous discussions/decisions,
 however we might be prepared to receive some complaints as it may be that
 non-conforming agents start to produce BadRequest errors. Difficult to say
 before going to production!

-- 
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/0107018a226deaec-e0d46ff0-f2ab-4880-950d-31e069046cff-00%40eu-central-1.amazonses.com.


Re: [Django] #27080: `as_manager` on QuerySet should pass down `use_in_migrations` to new Manager instance

2023-08-23 Thread Django
#27080: `as_manager` on QuerySet should pass down `use_in_migrations` to new
Manager instance
-+
 Reporter:  Leif Denby   |Owner:  (none)
 Type:  New feature  |   Status:  new
Component:  Migrations   |  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+
Changes (by Mariusz Felisiak):

 * owner:  Oliver Newman => (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/0107018a223f1818-ed9e8dac-5e7f-4104-895e-d5debbdea619-00%40eu-central-1.amazonses.com.


Re: [Django] #34744: Migration re-add constraints when check condition contains a dict_keys object.

2023-08-23 Thread Django
#34744: Migration re-add constraints when check condition contains a dict_keys
object.
+-
 Reporter:  bcail   |Owner:  David Sanders
 Type:  Bug |   Status:  closed
Component:  Migrations  |  Version:  dev
 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:"76c3e310dd37a1d77642a8744db636a3a4337af2" 76c3e310]:
 {{{
 #!CommitTicketReference repository=""
 revision="76c3e310dd37a1d77642a8744db636a3a4337af2"
 Fixed #34744 -- Prevented recreation of migration for constraints with a
 dict_keys.

 Co-authored-by: Mariusz Felisiak 
 }}}

-- 
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/0107018a220d7f83-da197a93-3b98-4da2-9f3d-ac63fffd45b3-00%40eu-central-1.amazonses.com.


Re: [Django] #34794: Multiple file upload issue

2023-08-23 Thread Django
#34794: Multiple file upload issue
-+-
 Reporter:  Waseem Kntar |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  File |  Version:  4.0
  uploads/storage|
 Severity:  Normal   |   Resolution:  invalid
 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:   => invalid


Comment:

 Thanks for the ticket, however, this is a support question and Trac is not
 a support channel. Also, you seem to be using Django 4.0 and docs for
 Django 4.2. If you're having trouble understanding how Django works, see
 TicketClosingReasons/UseSupportChannels for ways to get help.

-- 
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/0107018a220929f2-05e88156-0b73-414a-b5c1-66ef383182d7-00%40eu-central-1.amazonses.com.


Re: [Django] #34794: Multiple file upload issue

2023-08-23 Thread Django
#34794: Multiple file upload issue
-+-
 Reporter:  mo-waseem|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  File |  Version:  4.0
  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
-+-
Changes (by mo-waseem):

 * Attachment "Screenshot from 2023-08-23 11-14-20.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/0107018a21fea698-78016978-0905-429c-89d4-59753c99bc74-00%40eu-central-1.amazonses.com.


[Django] #34794: Multiple file upload issue

2023-08-23 Thread Django
#34794: Multiple file upload issue
+
   Reporter:  Waseem Kntar  |  Owner:  nobody
   Type:  Bug   | Status:  new
  Component:  File uploads/storage  |Version:  4.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 |
+
 Hello,

 I need a multiple file field in a form, so that I saw this section in
 django docs

 https://docs.djangoproject.com/en/4.2/topics/http/file-uploads/#uploading-
 multiple-files

 And the file field is accepting a multiple file now.

 The problem appear when I try to get those files by `request.FILES` in the
 post method, it shows the following (a screenshot):

 https://drive.google.com/file/d/1BIgd9mcQIZGf_pUzK4u-
 BPR56cVnKKEE/view?usp=sharing

 To solve this, I just cast request.FILES into a dict, after this I managed
 to access the attachments list.

 But why that happens in the MultiValueDict ?

-- 
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/0107018a21fde011-38e322cc-d398-42ba-b573-ca0accfb4c24-00%40eu-central-1.amazonses.com.


Re: [Django] #34784: Django french short date format translation bug

2023-08-23 Thread Django
#34784: Django french short date format translation bug
-+-
 Reporter:  Olivier Pons |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:   |  Version:  4.2
  Internationalization   |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
  translation,french,date|
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Olivier Pons):

 We should not only copy the `fr` folder and rename it as `fr_CH` (like we
 did for `es`), and distinguish between `fr_CH` / `fr_BE` and `fr`, but
 also change the date format in the `fr_FR` version from "`j N Y`" to
 "`d/m/Y`". Doing so should resolve the issue."

-- 
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/0107018a21f124e5-d9252ceb-c2cf-4341-86e5-6be8eba9b18f-00%40eu-central-1.amazonses.com.


Re: [Django] #34744: Migration re-add constraints when check condition contains a dict_keys object.

2023-08-23 Thread Django
#34744: Migration re-add constraints when check condition contains a dict_keys
object.
+-
 Reporter:  bcail   |Owner:  David Sanders
 Type:  Bug |   Status:  assigned
Component:  Migrations  |  Version:  dev
 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):

 * owner:  nobody => David Sanders
 * status:  new => assigned
 * has_patch:  0 => 1
 * 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/0107018a2190e3eb-1302a16f-abfd-4576-b7ce-7db4ccab3dfe-00%40eu-central-1.amazonses.com.


Re: [Django] #34752: ASGI http.disconnect not handled for streaming responses

2023-08-23 Thread Django
#34752: ASGI http.disconnect not handled for streaming responses
-+-
 Reporter:  Sam Toyer|Owner:  Sam Toyer
 Type:  Bug  |   Status:  assigned
Component:  HTTP handling|  Version:  dev
 Severity:  Release blocker  |   Resolution:
 Keywords:  async| 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/0107018a212b9832-9e705c96-522d-4689-a131-cff936b3be0d-00%40eu-central-1.amazonses.com.


Re: [Django] #34757: AsyncClient should follow redirects

2023-08-23 Thread Django
#34757: AsyncClient should follow redirects
-+-
 Reporter:  Mike Lissner |Owner:  Olivier
 |  Tabone
 Type:  New feature  |   Status:  assigned
Component:  Testing framework|  Version:  4.2
 Severity:  Normal   |   Resolution:
 Keywords:  async| Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Mariusz Felisiak ):

 In [changeset:"a9e0f3d3014461c2199123721899162c0876959d" a9e0f3d3]:
 {{{
 #!CommitTicketReference repository=""
 revision="a9e0f3d3014461c2199123721899162c0876959d"
 Refs #34757 -- Moved HTTP redirect logic to
 django.test.client.ClientMixin.
 }}}

-- 
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/0107018a20fed45a-d144d314-75c9-4156-ba46-e4afbdbb38ac-00%40eu-central-1.amazonses.com.