[Django] #35461: Tutorial instructions for adding third-party app don't work

2024-05-16 Thread Django
#35461: Tutorial instructions for adding third-party app don't work
-+
   Reporter:  dawbert|  Owner:  nobody
   Type:  Uncategorized  | Status:  new
  Component:  Documentation  |Version:  5.0
   Severity:  Normal |   Keywords:
   Triage Stage:  Unreviewed |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+
 Hey folks!

 The instructions in step 8 of the tutorial recommend adding the django-
 debug-toolbar as a way to understand third-party apps, etc, but it doesn't
 work without additional changes to the mysite project.

 https://docs.djangoproject.com/en/5.0/intro/tutorial08/#installing-django-
 debug-toolbar

 It finishes by saying, "Once installed, you should be able to see the DjDT
 “handle” on the right side of the browser window when you refresh the
 polls application."

 However, the panel only shows if the view has a "" tag, which none
 of the views you write have.

 Suggest either adding the body tag into the earlier pages, updating the
 documentation to say you need to add them, or using a different addon as
 an example.
-- 
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/0107018f84f19a6f-918561f7-de9f-4f22-a08f-a387e13945ef-00%40eu-central-1.amazonses.com.


Re: [Django] #32819: Fields’ help text and errors should be associated with input

2024-05-16 Thread Django
#32819: Fields’ help text and errors should be associated with input
-+-
 Reporter:  Thibaud Colas|Owner:  David
 |  Smith
 Type:  Bug  |   Status:  assigned
Component:  Forms|  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:  accessibility, ui,   | Triage Stage:  Accepted
  forms  |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  1
-+-
Changes (by Sarah Boyce):

 * 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/0107018f82428cb7-23d1be62-115b-4247-a013-e9a0c95471c7-00%40eu-central-1.amazonses.com.


Re: [Django] #35460: Clarify the python version for installing Django by local copy. (was: Docs: clarify the python version for installing Django by local copy.)

2024-05-16 Thread Django
#35460: Clarify the python version for installing Django by local copy.
-+-
 Reporter:  chengjackjelly   |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Documentation|  Version:  5.0
 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):

 * cc: Mariusz Felisiak (added)
 * component:  Uncategorized => Documentation
 * summary:  Docs: clarify the python version for installing Django by local
 copy. => Clarify the python version for installing Django by local
 copy.
 * type:  Uncategorized => Cleanup/optimization

-- 
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/0107018f823dcbf7-026ef260-dbfe-4b65-93f2-bd46e1484662-00%40eu-central-1.amazonses.com.


Re: [Django] #35460: Docs: clarify the python version for installing Django by local copy.

2024-05-16 Thread Django
#35460: Docs: clarify the python version for installing Django by local copy.
+--
 Reporter:  chengjackjelly  |Owner:  nobody
 Type:  Uncategorized   |   Status:  closed
Component:  Uncategorized   |  Version:  5.0
 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):

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

Comment:

 There are already many places where a specific Python 3 version is
 [https://docs.djangoproject.com/en/stable/faq/install/#what-python-
 version-can-i-use-with-django mentioned]. It also defined in `setup.cfg`.
 I don't think it's worth adding another place that we will have to
 remember to keep up 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/0107018f823d36ab-2ee98466-c082-4493-ab3e-cbb79bf07d3c-00%40eu-central-1.amazonses.com.


[Django] #35460: Docs: clarify the python version for installing Django by local copy.

2024-05-16 Thread Django
#35460: Docs: clarify the python version for installing Django by local copy.
--+
   Reporter:  chengjackjelly  |  Owner:  nobody
   Type:  Uncategorized   | Status:  new
  Component:  Uncategorized   |Version:  5.0
   Severity:  Normal  |   Keywords:
   Triage Stage:  Unreviewed  |  Has patch:  0
Needs documentation:  0   |Needs tests:  0
Patch needs improvement:  0   |  Easy pickings:  0
  UI/UX:  0   |
--+
 When I try to follow the instructions for [Writing your first patch for
 Django/Getting a copy of Django’s development
 version](https://docs.djangoproject.com/en/dev/intro/contributing/#getting-a
 -copy-of-django-s-development-version], I encounter a problem with python
 version.

 In the docs, we should use

 {{{
 python3 -m venv ~/.virtualenvs/djangodev
 }}}

 to create a new virtual environment by running. However, it doesn't point
 out the exact python3 version we should use. In the later

 {{{
 python -m pip install -e /path/to/your/local/clone/django/
 }}}

 I have a problem reported as

 {{{
 ERROR: Package 'Django-5.1.dev20240516091757' requires a different Python:
 3.8.3 not in '>=3.10'
 }}}

 Later on I install and change to the python version >=3.10 to solve the
 problem. It would be great if the docs specify the Python Interpreter
 version.
-- 
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/0107018f81ba9885-1ebb33db-4511-449c-829f-d93db0c31d70-00%40eu-central-1.amazonses.com.


[Django] #35459: Case.extra is undocumented, untested, and can hide potential issues

2024-05-16 Thread Django
#35459: Case.extra is undocumented, untested, and can hide potential issues
-+-
   Reporter:  Baptiste   |  Owner:  nobody
  Mispelon   |
   Type:  Bug| Status:  new
  Component:  Database   |Version:  5.0
  layer (models, ORM)|
   Severity:  Normal |   Keywords:
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 I came across this today while accidentally doing something like the
 following:
 {{{#!python
 MyModel.objects.annotate(x=Case(When(somefield=123), then=456,
 default=789))
 }}}

 The query ran without errors and produced results but they were slightly
 wrong. It took me longer than I'd like to admit to realize that I should
 have written:
 {{{#!python
 MyModel.objects.annotate(x=Case(When(somefield=123, then=456),
 default=789))
 }}}

 (in case you hadn't seen the difference, the `then` kwarg was passed to
 `Case` instead of `When`).

 Once I figured out what was going on, I was surprised that Django had
 accepted the `then` argument for `Case`. I would have expected a
 `TypeError`.

 The documentation [1] does mention that the signature is `class
 Case(*cases, **extra)`, but doesn't explain what happens to `**extra`, and
 even later refers to "the default keyword argument" which seems
 inconsistent.

 To top it all of, it seems that the feature is untested. I removed
 `**extra` from `Case.__init__` and `Case.as_sql()`, ran the full test
 suite (under sqlite), and got zero errors:
 {{{#!diff
 diff --git a/django/db/models/expressions.py
 b/django/db/models/expressions.py
 index 4ee22420d9..34308fad9c 100644
 --- a/django/db/models/expressions.py
 +++ b/django/db/models/expressions.py
 @@ -1562,13 +1562,12 @@ class Case(SQLiteNumericMixin, Expression):
  template = "CASE %(cases)s ELSE %(default)s END"
  case_joiner = " "

 -def __init__(self, *cases, default=None, output_field=None, **extra):
 +def __init__(self, *cases, default=None, output_field=None):
  if not all(isinstance(case, When) for case in cases):
  raise TypeError("Positional arguments must all be When
 objects.")
  super().__init__(output_field)
  self.cases = list(cases)
  self.default = self._parse_expressions(default)[0]
 -self.extra = extra

  def __str__(self):
  return "CASE %s, ELSE %r" % (
 @@ -1610,7 +1609,7 @@ class Case(SQLiteNumericMixin, Expression):
  connection.ops.check_expression_support(self)
  if not self.cases:
  return compiler.compile(self.default)
 -template_params = {**self.extra, **extra_context}
 +template_params = {**extra_context}
  case_parts = []
  sql_params = []
  default_sql, default_params = compiler.compile(self.default)
 }}}

 As far as I can tell, this feature has been present since `Case` was
 introduced in #24031 (65246de7b1d70d25831ab394c4f4a75813f629fe).

 I would be tempted to drop it considering the way it silently swallows
 unknown kwargs. Am I missing something?


 [1] https://docs.djangoproject.com/en/dev/ref/models/conditional-
 expressions/#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/0107018f81ac2ace-326215f8-cc94-4b1a-b93f-b2e97b88bdc6-00%40eu-central-1.amazonses.com.


Re: [Django] #373: Add support for multi-columns fields.

2024-05-16 Thread Django
#373: Add support for multi-columns fields.
-+-
 Reporter:  Jacob|Owner:  Csirmaz
 |  Bendegúz
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  database | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Csirmaz Bendegúz):

 * needs_better_patch:  1 => 0
 * needs_docs:  1 => 0
 * owner:  Clouds => Csirmaz Bendegúz

-- 
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/0107018f80eaefad-af83f5a2-74ac-4c71-a60c-8db9e2f7fe79-00%40eu-central-1.amazonses.com.


Re: [Django] #35457: Documentation: Code inside of text box

2024-05-16 Thread Django
#35457: Documentation: Code inside of text box
-+-
 Reporter:  Treyson Grange   |Owner:  sammy20d
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Uncategorized|  Version:  5.0
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:  Documentation| Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  1
-+-
Comment (by Adam Johnson):

 Yeah. There’s an open PR in blacken-docs but it needs significant rework
 before merging and I haven't prioritized it.
-- 
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/0107018f80cc3c96-5f99011e-7d85-4c96-b366-76035499c8aa-00%40eu-central-1.amazonses.com.


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

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

 * 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/0107018f80bde968-a17647e4-0c0f-4c58-8b5c-e72743877368-00%40eu-central-1.amazonses.com.


Re: [Django] #35443: Fix negative numbers for ordinals

2024-05-16 Thread Django
#35443: Fix negative numbers for ordinals
-+-
 Reporter:  Siburg   |Owner:
 |  S-Tornqvist, Crustum7
 Type:  Bug  |   Status:  assigned
Component:  contrib.humanize |  Version:  5.0
 Severity:  Normal   |   Resolution:
 Keywords:  humanize ordinal | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Crustum7):

 * cc: Crustum7 (added)
 * has_patch:  0 => 1

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018f8086b5e6-14db1e7f-fa28-4d48-bf6a-664d47bcb31e-00%40eu-central-1.amazonses.com.


Re: [Django] #35443: Fix negative numbers for ordinals

2024-05-16 Thread Django
#35443: Fix negative numbers for ordinals
-+-
 Reporter:  Siburg   |Owner:
 |  S-Tornqvist, Crustum7
 Type:  Bug  |   Status:  assigned
Component:  contrib.humanize |  Version:  5.0
 Severity:  Normal   |   Resolution:
 Keywords:  humanize ordinal | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Crustum7):

 * owner:  nobody => S-Tornqvist, Crustum7
 * 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/0107018f807ded2b-0e66ffb8-009f-491f-8767-81c2fdf39539-00%40eu-central-1.amazonses.com.


Re: [Django] #35428: ScryptPasswordHasher parallelism parameter is lower than the recommended in OWASP

2024-05-16 Thread Django
#35428: ScryptPasswordHasher parallelism parameter is lower than the 
recommended in
OWASP
-+-
 Reporter:  Natalia Bidart   |Owner:  Jae Hyuck
 Type:   |  Sa
  Cleanup/optimization   |   Status:  assigned
Component:  contrib.auth |  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:  hashers iterations   | 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 Sarah Boyce):

 * 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/0107018f80719413-a9273afd-5e00-4631-ba69-7be408bc13a6-00%40eu-central-1.amazonses.com.


Re: [Django] #35456: Fieldset title inside a collapsed StackedInline are `h3` but on errors are shown as `h2` (was: Fieldset title inside StackedInline are `h3` but on errors are shown as `h2`)

2024-05-16 Thread Django
#35456: Fieldset title inside a collapsed StackedInline are `h3` but on errors 
are
shown as `h2`
-+-
 Reporter:  Natalia Bidart   |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  contrib.admin|  Version:  5.0
 Severity:  Normal   |   Resolution:  duplicate
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+-
Changes (by Sarah Boyce):

 * resolution:   => duplicate
 * status:  new => closed
 * summary:
 Fieldset title inside StackedInline are `h3` but on errors are shown
 as `h2`
 =>
 Fieldset title inside a collapsed StackedInline are `h3` but on errors
 are shown as `h2`

Comment:

 Thank you for the models, admin and screenshots!

 I think the core issue here you are reporting is that the heading tag
 should not change between the collapse and expand state. When there is an
 error, this is in the expanded state but this header tag switching
 behaviour also happens when clicking on show and hide.

 What the header tags should be is also interesting. This article helped me
 understand: https://developer.mozilla.org/en-
 US/docs/Web/HTML/Element/Heading_Elements
 Here are some rules:
 - Have only 1  (this is "Add book")
 - Don't skip headers
 - Use headers to show subsections

 I think these are the issues:
 - the first collapsed inline "Advanced options" is h2 when collapsed but
 h3 when expanded. It should always be h2 otherwise we skip a header level
 - the next collapsed inline "History" is h2 when collapsed but h3 when
 expanded. In this case it is subsection of `Review: #1` which is a h3 (1.
 Add book > 2. Reviews > 3. `Review #1`) and so as a subsection of a h3, it
 should be a h4 in both collapsed and expanded.

 Then basically there are 2 bugs:
 - the header shouldn't change between the collapse and expanded state
 (this issue is covered by #35189)
 - inline headers do not respect the page hierarchy (this is independent of
 the collapse and expand feature, it is "touched" upon in #35189 and will
 likely be fixed in #35189 - we can pull this out to a separate issue if we
 wish)

 I am going to mark this as a duplicate of #35189 as what you have reported
 I believe is covered and will be fixed there 👍
-- 
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/0107018f803f6e78-393757d3-a438-4ad5-be07-450edd6bb8a6-00%40eu-central-1.amazonses.com.