Re: [Django] #34345: Add system check for filter_horizontal/filter_vertical on ManyToManyFields with intermediary models.

2023-02-16 Thread Django
#34345: Add system check for filter_horizontal/filter_vertical on 
ManyToManyFields
with intermediary models.
--+
 Reporter:  David Pratten |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  contrib.admin |  Version:  4.1
 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 Mariusz Felisiak):

 Replying to [comment:3 David Pratten]:
 > Thanks.  Sounds like a good outcome.

 Would you like to prepare a patch via GitHub PR? The following should
 work:
 {{{#!diff
 diff --git a/django/contrib/admin/checks.py
 b/django/contrib/admin/checks.py
 index 27537d9614..a844b3f16f 100644
 --- a/django/contrib/admin/checks.py
 +++ b/django/contrib/admin/checks.py
 @@ -533,6 +533,16 @@ class BaseModelAdminChecks:
  return must_be(
  "a many-to-many field", option=label, obj=obj,
 id="admin.E020"
  )
 +elif not field.remote_field.through._meta.auto_created:
 +return [
 +checks.Error(
 +f"The value of '{label}' cannot include the
 ManyToManyField "
 +f"'{field_name}', because that field manually
 specifies a "
 +f"relationship model.",
 +obj=obj.__class__,
 +id="admin.E013",
 +)
 +]
  else:
  return []

 }}}
 Tests and [https://docs.djangoproject.com/en/stable/ref/checks/#admin docs
 changes] (in the `admin.E013` description) are also required.

-- 
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/010701865e246baf-54ebc536-6ab9-4a98-b339-a678a86081ab-00%40eu-central-1.amazonses.com.


Re: [Django] #34345: Add system check for filter_horizontal/filter_vertical on ManyToManyFields with intermediary models.

2023-02-16 Thread Django
#34345: Add system check for filter_horizontal/filter_vertical on 
ManyToManyFields
with intermediary models.
--+
 Reporter:  David Pratten |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  contrib.admin |  Version:  4.1
 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 David Pratten):

 Thanks.  Sounds like a good outcome.

-- 
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/010701865e17d1be-0a18fddb-36cf-4a7b-886a-8a8f4224a0ab-00%40eu-central-1.amazonses.com.


Re: [Django] #34345: Add system check for filter_horizontal/filter_vertical on ManyToManyFields with intermediary models. (was: filter_horizontal and filter_vertical don't work with through)

2023-02-16 Thread Django
#34345: Add system check for filter_horizontal/filter_vertical on 
ManyToManyFields
with intermediary models.
--+
 Reporter:  David Pratten |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  contrib.admin |  Version:  4.1
 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):

 * component:  Documentation => contrib.admin
 * stage:  Unreviewed => Accepted


Comment:

 What do you think about raising `admin.E013` in this case?

 ''"fields[n]/fieldsets[n][m]/filter_vertical[n]/filter_horizontal[n]
 cannot include the ManyToManyField , because that field
 manually specifies a relationship model."''

-- 
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/010701865e157556-58ac9b5b-e55a-4086-8deb-a48f162b97b4-00%40eu-central-1.amazonses.com.


Re: [Django] #34345: filter_horizontal and filter_vertical don't work with through (was: filter_horizontal and filter_vertical don't work with through - limitation not documented)

2023-02-16 Thread Django
#34345: filter_horizontal and filter_vertical don't work with through
-+-
 Reporter:  David Pratten|Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Documentation|  Version:  4.1
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * keywords:  Gotcha =>
 * type:  Bug => Cleanup/optimization
 * easy:  1 => 0


Comment:

 > Neither of
 >
 > -
 
https://docs.djangoproject.com/en/4.1/ref/contrib/admin/#django.contrib.admin.ModelAdmin.filter_horizontal
 and
 > -
 
https://docs.djangoproject.com/en/4.1/ref/contrib/admin/#django.contrib.admin.ModelAdmin.filter_vertical
 >
 > call out the requirement to **not** use
 > {{{
 > ManyToManyField(through="")
 > }}}

 There is a separate section in the same docs that describes
 [https://docs.djangoproject.com/en/stable/ref/contrib/admin/#working-with-
 many-to-many-intermediary-models Working with many-to-many intermediary
 models]. I don't think it is necessary to cross-refer this section in all
 places where `ManyToManyField` is mentioned.

 > In the same way:
 > -
 
https://docs.djangoproject.com/en/4.1/ref/models/fields/#django.db.models.ManyToManyField.through
 >
 > doesn't call out the consequence that filter_horizontal and
 filter_vertical will stop working if one goes down the pathway of:
 >
 > {{{
 > ManyToManyField(through="")
 > }}}

 Models docs are not the right place to describe how contrib apps work.

 -

 What do you think about changing `admin.E020` to:
 > "The value of `filter_vertical[n]/filter_horizontal[n]` must be a many-
 to-many field without a `through` model.
 and raising a system check in this case?

-- 
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/010701865dd5c7fe-5a2bf61d-bc66-4675-989f-34d87f06216b-00%40eu-central-1.amazonses.com.


Re: [Django] #34344: PostGIS Database Backend Overrides features_class, ops_class and introspection_class

2023-02-16 Thread Django
#34344: PostGIS Database Backend Overrides features_class, ops_class and
introspection_class
-+-
 Reporter:  David Buhler |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  GIS  |  Version:  dev
 Severity:  Normal   |   Resolution:  needsinfo
 Keywords:  geodjango postgis| Triage Stage:
  database backend   |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

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


Comment:

 Thanks for this ticket, however using `features_class`, `ops_class`, and
 `introspection_class` will cause initializing PostGIS stuff for non-db
 connections (see 7e714827ead50f77aa82394cc2511ff96ab67fa4 and #16969) as
 they will be initialized in `PsycopgDatabaseWrapper.__init__()` and
 `NO_DB_ALIAS`-branch doesn't change anything anymore. Is there a way to
 use `features_class`, `ops_class`, and `introspection_class` in a backward
 compatible way?

-- 
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/010701865db37e31-15312834-4c7a-43b7-b692-411aa7588255-00%40eu-central-1.amazonses.com.


Re: [Django] #34343: Move more templates to filesystem

2023-02-16 Thread Django
#34343: Move more templates to filesystem
-+-
 Reporter:  Nick Pope|Owner:  Nick Pope
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  Uncategorized|  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:  templates,   | Triage Stage:  Accepted
  filesystem |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Claude Paroz):

 * stage:  Unreviewed => 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/010701865c433493-d70f6982-3c98-4071-9d2e-df93d0caa337-00%40eu-central-1.amazonses.com.


[Django] #34345: filter_horizontal and filter_vertical don't work with through - limitation not documented

2023-02-16 Thread Django
#34345: filter_horizontal and filter_vertical don't work with through - 
limitation
not documented
-+
   Reporter:  David Pratten  |  Owner:  nobody
   Type:  Bug| Status:  new
  Component:  Documentation  |Version:  4.1
   Severity:  Normal |   Keywords:  Gotcha
   Triage Stage:  Unreviewed |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  1
  UI/UX:  0  |
-+
 Hi team,

 I'm a huge fan of Django and have been using it since 0.95 but I stumbled
 over this one.

 Neither of

 -
 
https://docs.djangoproject.com/en/4.1/ref/contrib/admin/#django.contrib.admin.ModelAdmin.filter_horizontal
 and
 -
 
https://docs.djangoproject.com/en/4.1/ref/contrib/admin/#django.contrib.admin.ModelAdmin.filter_vertical

 call out the requirement to **not** use
 {{{
 ManyToManyField(through="")
 }}}

 In the same way:
 -
 
https://docs.djangoproject.com/en/4.1/ref/models/fields/#django.db.models.ManyToManyField.through

 doesn't call out the consequence that filter_horizontal and
 filter_vertical will stop working if one goes down the pathway of:

 {{{
 ManyToManyField(through="")
 }}}


 I just wasted half a day chasing this down.

-- 
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/010701865c378d84-35079b87-b1da-4cb5-b0a2-82566b5a6720-00%40eu-central-1.amazonses.com.


Re: [Django] #21080: collectstatic post-processing fails for references inside comments

2023-02-16 Thread Django
#21080: collectstatic post-processing fails for references inside comments
-+-
 Reporter:  shreyas@…|Owner:  Tomáš
 |  Zigo
 Type:  Bug  |   Status:  assigned
Component:  contrib.staticfiles  |  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
-+-

Comment (by Claude Paroz):

 If someone has time to make a little study on how we could use a real
 parser (e.g. [https://lark-parser.readthedocs.io/en/latest/ lark] or
 [https://pyparsing-docs.readthedocs.io/en/latest/ pyparsing]) to strip
 comments from CSS and JS, would be awesome! I'm sure a general parser
 could be used in other parts of Django as well.

-- 
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/010701865c37644f-08c3284d-701c-49da-b7fb-8cd0fd642f50-00%40eu-central-1.amazonses.com.


Re: [Django] #34344: PostGIS Database Backend Overrides features_class, ops_class and introspection_class

2023-02-16 Thread Django
#34344: PostGIS Database Backend Overrides features_class, ops_class and
introspection_class
-+-
 Reporter:  davidjayb|Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  GIS  |  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:  geodjango postgis| Triage Stage:
  database backend   |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by davidjayb):

 Here is a patch to fix the issue:
 https://github.com/django/django/pull/16563

-- 
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/010701865c2abc75-6e4e872e-bccf-492c-b9fb-0f5279eaba3e-00%40eu-central-1.amazonses.com.


[Django] #34344: PostGIS Database Backend Overrides features_class, ops_class and introspection_class

2023-02-16 Thread Django
#34344: PostGIS Database Backend Overrides features_class, ops_class and
introspection_class
-+-
   Reporter:  davidjayb  |  Owner:  nobody
   Type: | Status:  new
  Cleanup/optimization   |
  Component:  GIS|Version:  dev
   Severity:  Normal |   Keywords:  geodjango postgis
   Triage Stage: |  database backend
  Unreviewed |  Has patch:  1
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 While working on adding PostGIS support to the django-multitenant library
 I had some issues with the features_class that was overridden in the
 DatabaseWrapper subclass. After some troubleshooting I was able to
 determine this is because the PostGIS backend explicitly sets the
 `features`, `ops`, and `introspection` properties to the file local
 classes:

 
https://github.com/django/django/blob/stable/4.2.x/django/contrib/gis/db/backends/postgis/base.py#L91

 I was able to work around this behaviour by overriding the constructor and
 setting the features property explicitly:

 https://github.com/citusdata/django-multitenant/pull/150/files#diff-
 0d077af5d4e86f31f478785458ea6a03768a15aea077f49b9a79ffca8b0fe4beR37

 This isn't very intuitive as other database backends will respect setting
 the `_class` properties to instantiate classes.

-- 
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/010701865c29e59d-9f9326a5-f3ba-4fc3-b8f1-73d1e5dfdf98-00%40eu-central-1.amazonses.com.


Re: [Django] #34343: Move more templates to filesystem

2023-02-16 Thread Django
#34343: Move more templates to filesystem
-+-
 Reporter:  Nick Pope|Owner:  Nick Pope
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  Uncategorized|  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:  templates,   | Triage Stage:
  filesystem |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Nick Pope):

 * has_patch:  0 => 1


Comment:

 [https://github.com/django/django/pull/16562 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/010701865bdfba74-28768f27-d206-4c60-9d4d-28e389aeefb3-00%40eu-central-1.amazonses.com.


[Django] #34343: Move more templates to filesystem

2023-02-16 Thread Django
#34343: Move more templates to filesystem
-+-
   Reporter:  Nick Pope  |  Owner:  Nick Pope
   Type: | Status:  assigned
  Cleanup/optimization   |
  Component: |Version:  dev
  Uncategorized  |   Keywords:  templates,
   Severity:  Normal |  filesystem
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 In #28007 debug templates were moved to be loaded from the filesystem.

 It would also be cleaner to move the following larger templates out of
 Python code:

 - `django.views.csrf.CSRF_FAILURE_TEMPLATE`
 - `django.views.i18n.js_catalog_template`
 - `django.views.static.DEFAULT_DIRECTORY_INDEX_TEMPLATE`

-- 
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/010701865bdc5be8-f80fd2c2-bdc5-4c0d-8a2e-9449ceef5dfd-00%40eu-central-1.amazonses.com.


Re: [Django] #21080: collectstatic post-processing fails for references inside comments

2023-02-16 Thread Django
#21080: collectstatic post-processing fails for references inside comments
-+-
 Reporter:  shreyas@…|Owner:  Tomáš
 |  Zigo
 Type:  Bug  |   Status:  assigned
Component:  contrib.staticfiles  |  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
-+-

Comment (by Mariusz Felisiak):

 #34322 was a duplicate for ES module imports.

-- 
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/010701865b7d9408-acc541e5-d1ed-49ab-a89a-c6bfca3f8576-00%40eu-central-1.amazonses.com.


Re: [Django] #34322: ManifestStaticFilesStorage crashes on commented JavaScript import statements

2023-02-16 Thread Django
#34322: ManifestStaticFilesStorage crashes on commented JavaScript import
statements
-+-
 Reporter:  Adam Johnson |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  contrib.staticfiles  |  Version:  4.2
 Severity:  Normal   |   Resolution:  duplicate
 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):

 * status:  new => closed
 * resolution:   => duplicate
 * severity:  Release blocker => Normal


Comment:

 Duplicate of #21080.

-- 
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/010701865b7b74bc-cc81c592-8d0b-43dc-abad-a9054452910d-00%40eu-central-1.amazonses.com.


Re: [Django] #21080: collectstatic post-processing fails for references inside comments

2023-02-16 Thread Django
#21080: collectstatic post-processing fails for references inside comments
-+-
 Reporter:  shreyas@…|Owner:  Tomáš
 |  Zigo
 Type:  Bug  |   Status:  assigned
Component:  contrib.staticfiles  |  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
-+-

Comment (by Mariusz Felisiak ):

 In [changeset:"60be5909a29650a5e7595bbdc4012b0ad0c390af" 60be590]:
 {{{
 #!CommitTicketReference repository=""
 revision="60be5909a29650a5e7595bbdc4012b0ad0c390af"
 [4.1.x] Refs #21080, Refs #34322 -- Added warning to
 ManifestStaticFilesStorage docs about paths in comments.

 Backport of bae053d497ba8a8de7e4f725973924bfb1885fd2 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/010701865b798144-3b806b4b-1430-49b0-9bb7-54592b52d668-00%40eu-central-1.amazonses.com.


Re: [Django] #34322: ManifestStaticFilesStorage crashes on commented JavaScript import statements

2023-02-16 Thread Django
#34322: ManifestStaticFilesStorage crashes on commented JavaScript import
statements
-+
 Reporter:  Adam Johnson |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  contrib.staticfiles  |  Version:  4.2
 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 Mariusz Felisiak ):

 In [changeset:"60be5909a29650a5e7595bbdc4012b0ad0c390af" 60be590]:
 {{{
 #!CommitTicketReference repository=""
 revision="60be5909a29650a5e7595bbdc4012b0ad0c390af"
 [4.1.x] Refs #21080, Refs #34322 -- Added warning to
 ManifestStaticFilesStorage docs about paths in comments.

 Backport of bae053d497ba8a8de7e4f725973924bfb1885fd2 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/010701865b79815e-219fd316-ee19-4d44-8149-a998d47ad1a0-00%40eu-central-1.amazonses.com.


Re: [Django] #21080: collectstatic post-processing fails for references inside comments

2023-02-16 Thread Django
#21080: collectstatic post-processing fails for references inside comments
-+-
 Reporter:  shreyas@…|Owner:  Tomáš
 |  Zigo
 Type:  Bug  |   Status:  assigned
Component:  contrib.staticfiles  |  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
-+-

Comment (by Mariusz Felisiak ):

 In [changeset:"e1c74bf45803cbde28149fbc80d91dc3b244e7fc" e1c74bf4]:
 {{{
 #!CommitTicketReference repository=""
 revision="e1c74bf45803cbde28149fbc80d91dc3b244e7fc"
 [4.2.x] Refs #21080, Refs #34322 -- Added warning to
 ManifestStaticFilesStorage docs about paths in comments.

 Backport of bae053d497ba8a8de7e4f725973924bfb1885fd2 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/010701865b777306-3a896351-aee7-4341-bf85-008b992558b3-00%40eu-central-1.amazonses.com.


Re: [Django] #34322: ManifestStaticFilesStorage crashes on commented JavaScript import statements

2023-02-16 Thread Django
#34322: ManifestStaticFilesStorage crashes on commented JavaScript import
statements
-+
 Reporter:  Adam Johnson |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  contrib.staticfiles  |  Version:  4.2
 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 Mariusz Felisiak ):

 In [changeset:"e1c74bf45803cbde28149fbc80d91dc3b244e7fc" e1c74bf4]:
 {{{
 #!CommitTicketReference repository=""
 revision="e1c74bf45803cbde28149fbc80d91dc3b244e7fc"
 [4.2.x] Refs #21080, Refs #34322 -- Added warning to
 ManifestStaticFilesStorage docs about paths in comments.

 Backport of bae053d497ba8a8de7e4f725973924bfb1885fd2 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/010701865b77731e-6a65e7ee-049f-49ec-b61b-ba1513b3ef72-00%40eu-central-1.amazonses.com.


Re: [Django] #34322: ManifestStaticFilesStorage crashes on commented JavaScript import statements

2023-02-16 Thread Django
#34322: ManifestStaticFilesStorage crashes on commented JavaScript import
statements
-+
 Reporter:  Adam Johnson |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  contrib.staticfiles  |  Version:  4.2
 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 GitHub ):

 In [changeset:"bae053d497ba8a8de7e4f725973924bfb1885fd2" bae053d4]:
 {{{
 #!CommitTicketReference repository=""
 revision="bae053d497ba8a8de7e4f725973924bfb1885fd2"
 Refs #21080, Refs #34322 -- Added warning to ManifestStaticFilesStorage
 docs about paths in comments.
 }}}

-- 
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/010701865b738f3a-cd8c4528-546f-4017-8587-8f52e030cce2-00%40eu-central-1.amazonses.com.


Re: [Django] #21080: collectstatic post-processing fails for references inside comments

2023-02-16 Thread Django
#21080: collectstatic post-processing fails for references inside comments
-+-
 Reporter:  shreyas@…|Owner:  Tomáš
 |  Zigo
 Type:  Bug  |   Status:  assigned
Component:  contrib.staticfiles  |  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
-+-

Comment (by GitHub ):

 In [changeset:"bae053d497ba8a8de7e4f725973924bfb1885fd2" bae053d4]:
 {{{
 #!CommitTicketReference repository=""
 revision="bae053d497ba8a8de7e4f725973924bfb1885fd2"
 Refs #21080, Refs #34322 -- Added warning to ManifestStaticFilesStorage
 docs about paths in comments.
 }}}

-- 
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/010701865b738f1f-7a28de4c-651d-4f5f-b5f9-5f881614a027-00%40eu-central-1.amazonses.com.


Re: [Django] #33738: ASGI http.disconnect not handled on requests with body.

2023-02-16 Thread Django
#33738: ASGI http.disconnect not handled on requests with body.
-+-
 Reporter:  Carlton Gibson   |Owner:  Dennis
 |  Chukwunta
 Type:  Bug  |   Status:  assigned
Component:  HTTP handling|  Version:  4.0
 Severity:  Normal   |   Resolution:
 Keywords:  ASGI | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Carlton Gibson):

 With regard to detecting `http.disconnect`, it looks like there are two
 options.

 First, if we gave `ASGIRequest` a reference to the application `receive`
 queue (via `__init__`) then we could add something like an
 `is_disconnected` method that could see if there was an event message
 pending, and if it were, whether it was a `http.disconnect` method. (I
 don't think the spec allows anything else, since the body messages have
 been consumed prior to instantiating the request.) Views could then call
 this method periodically, or before beginning an expensive process, to
 know to finish up early.

 Second, inside handle we could launch a separate task to `get` on the
 receive queue after creating the `body_file` and listen for the disconnect
 events which we'd then use as notice to cancel the view dispatch. That
 would need some restructuring, since the view dispatch would need wrapping
 in a task (in order to have something to cancel), but I guess would be
 feasible. Proof-of-concept here desirable. 樂

 I think option 1 if probably simpler.

-- 
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/010701865a9f9d6a-969d1085-5e4f-456b-b2cd-d5f9edbbdd17-00%40eu-central-1.amazonses.com.


Re: [Django] #34341: FileSystemFinder harsh regarding its input on Windows

2023-02-16 Thread Django
#34341: FileSystemFinder harsh regarding its input on Windows
-+-
 Reporter:  Marc Perrin  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  contrib.staticfiles  |  Version:  3.2
 Severity:  Normal   |   Resolution:  invalid
 Keywords:  Windows  | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Marc Perrin):

 Re how I reach `find_location()` (well, `finders.find()`) with a path from
 another OS (well, an url path), see:
 [https://github.com/evansd/whitenoise/issues/472]
 
[https://github.com/evansd/whitenoise/blob/main/src/whitenoise/middleware.py#L158]

 But if the spec is that `finders.find()` must be called with an OS-
 standardized path, it's a valid answer to my concern, and it means the fix
 has to happen on whitenoise side.

 After all, `finders.find()` is in `django.contrib.staticfiles` indeed, and
 even though I found it surprising that it would not be more flexible,
 maybe it makes sense.



 Replying to [comment:3 Mariusz Felisiak]:
 > > other finders (e.g. `AppDirectoriesFinder`) seem much more lenient
 >
 > `AppDirectoriesFinder` had exactly the same code before removing
 `AppStaticStorage`, see f56c88a8eed91f68f6845bbf730f7b7361c5cfb1 and
 #21867.
 >
 > > In my case, when debugging I go into the return None a lot because
 os.sep is backslash, and the args of find_location are for example:
 > > {{{
 > > root = r'C:\some\folder\for\react\files'
 > > path = 'bundled_react/some_file.hot-update.js'
 > > prefix = 'bundled_react'
 > > }}}
 >
 > I'm not sure how you reached `find_location()` with a path from another
 OS. It seems that you're using it in a non-intended way and if so you need
 to standardize paths before passing them to `FileSystemFinder` on your
 own. Also, using `commonpath()` is not a proper change as it breaks many
 tests. I hope that makes sense.

-- 
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/010701865a95091c-e03a16fb-5019-4cf1-9675-90c5de22bbfe-00%40eu-central-1.amazonses.com.


Re: [Django] #33699: Read ASGI request body from asyncio queue on-demand

2023-02-16 Thread Django
#33699: Read ASGI request body from asyncio queue on-demand
---+
 Reporter:  Noxx   |Owner:  noneNote
 Type:  New feature|   Status:  closed
Component:  HTTP handling  |  Version:  dev
 Severity:  Normal |   Resolution:  wontfix
 Keywords:  ASGI, 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 Carlton Gibson):

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


Comment:

 Looking at this again, with an eye to #33738 — which is how we handle
 `http.disconnect` event as they come in — it's not clear that we can
 actually read the body file on demand (as nice as that might be in
 theory).

 The [https://asgi.readthedocs.io/en/latest/specs/www.html#request-receive-
 event ASGI spec] is quite clear on the required behaviour:

 * "...the body message serves ... as a trigger to actually run request
 code (as you should not trigger on a connection opening alone)." (Elided
 to bring out the force.)
 * `more_body` (bool) – Signifies if there is additional content to come
 (as part of a Request message). If `True`, the consuming application
 should wait until it gets a chunk with this set to `False`. If `False`,
 the request is complete and should be processed.

 i.e. The application is not permitted to begin processing the request
 until a `more_body: False` is received. You can't get that unless you read
 the body.

 On top of that, ref #33738, if you want to look for an `http.disconnect`,
 however you might do that, you need to have got the body events, which
 come in on the same queue, out of the way in order to do that. A handler
 for a long-lived connection that wanted to check that the client hadn't
 disconnected **before** processing an expensive operation on the submitted
 body would be stuck.

 Short of a PoC, and an unlikely change to the ASGI spec here, I think we
 have to close this as wontfix.

-- 
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/010701865a93fc84-cf05c013-e63a-4d95-a629-919e8cccf2c6-00%40eu-central-1.amazonses.com.


Re: [Django] #12090: Show admin actions on the edit pages too

2023-02-16 Thread Django
#12090: Show admin actions on the edit pages too
-+-
 Reporter:  Florian Apolloner|Owner:  Marcelo
 |  Galigniana
 Type:  New feature  |   Status:  assigned
Component:  contrib.admin|  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:  1
-+-

Comment (by Marcelo Galigniana):

 I'm leaving a message here to let you know that I'm still active and
 contributing but I don't have enough time to dedicate to this big ticket
 yet.

 If someone has the time to work in it feel free to claim it! If not ->
 I'll be working on it later for sure, but I don't know exactly when.

 Thank you!

-- 
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/010701865a7eba27-026aeff5-88ee-4f8a-938e-e8c219829131-00%40eu-central-1.amazonses.com.


Re: [Django] #34322: ManifestStaticFilesStorage crashes on commented JavaScript import statements

2023-02-16 Thread Django
#34322: ManifestStaticFilesStorage crashes on commented JavaScript import
statements
-+
 Reporter:  Adam Johnson |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  contrib.staticfiles  |  Version:  4.2
 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 Mariusz Felisiak):

 I think documenting this issue is justified as it's been 9 years since it
 was opened, see [https://github.com/django/django/pull/16561 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/010701865a0b5e07-d2e7a607-a34b-4df6-80a2-964fd100b610-00%40eu-central-1.amazonses.com.


Re: [Django] #34338: Allow to customize the code attribute of ValidationError raised by BaseConstraint.validate

2023-02-16 Thread Django
#34338: Allow to customize the code attribute of ValidationError raised by
BaseConstraint.validate
-+-
 Reporter:  xafer|Owner:  xafer
 Type:  New feature  |   Status:  assigned
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:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by xafer):

 * has_patch:  0 => 1


Comment:

 [https://github.com/django/django/pull/16560 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/0107018659d5f500-11369270-07aa-440d-a84a-a778790089df-00%40eu-central-1.amazonses.com.


Re: [Django] #34309: Documentate how to delete a Django app correctly

2023-02-16 Thread Django
#34309: Documentate how to delete a Django app correctly
+
 Reporter:  Marcelo Galigniana  |Owner:  noFFENSE
 Type:  New feature |   Status:  assigned
Component:  Documentation   |  Version:  4.1
 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 Marcelo Galigniana):

 * owner:  Marcelo Galigniana => noFFENSE


-- 
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/0107018659b6924c-009082da-feac-44ca-981e-2bb198f8277a-00%40eu-central-1.amazonses.com.


Re: [Django] #34045: Admin changelist checkboxes do not have labels

2023-02-16 Thread Django
#34045: Admin changelist checkboxes do not have labels
-+-
 Reporter:  Tom Carrick  |Owner:  Durval
 |  Carvalho
 Type:  Bug  |   Status:  closed
Component:  contrib.admin|  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:  1
-+-
Changes (by Mariusz Felisiak ):

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


Comment:

 In [changeset:"85366fbca723c9b37d0ac9db1d44e3f1cb188db2" 85366fb]:
 {{{
 #!CommitTicketReference repository=""
 revision="85366fbca723c9b37d0ac9db1d44e3f1cb188db2"
 Fixed #34045 -- Improved accessibility of selecting items in admin
 changelist.

 This adds "aria-label".
 }}}

-- 
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/0107018659afd7ea-a34fa860-f742-46b0-a854-d04019ea99dd-00%40eu-central-1.amazonses.com.


Re: [Django] #34342: The test async_client is not consuming async StreamingResponse generators properly

2023-02-16 Thread Django
#34342: The test async_client is not consuming async StreamingResponse 
generators
properly
-+-
 Reporter:  Alexandre Spaeth |Owner:  Alexandre
 |  Spaeth
 Type:  Bug  |   Status:  assigned
Component:  Testing framework|  Version:  4.2
 Severity:  Release blocker  |   Resolution:
 Keywords:  async| 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 Carlton Gibson):

 * 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/01070186598b3b0f-bf2a53b9-8c2c-4654-9193-7a46342b97a6-00%40eu-central-1.amazonses.com.