Re: [Django] #35380: Have the images from docs/ref/contrib/admin/_images/ automatically generated.

2024-05-29 Thread Django
#35380: Have the images from docs/ref/contrib/admin/_images/ automatically
generated.
--+
 Reporter:  Sarah Boyce   |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Documentation |  Version:  dev
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Natalia Bidart):

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

Comment:

 Setting has_patch to start the conversation on the topic, but the
 [https://github.com/django/django/pull/18211 PR] definitely needs
 improvement.
-- 
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/0107018fc7670f2f-579ba971-f18f-431c-8665-2f49587ff8af-00%40eu-central-1.amazonses.com.


Re: [Django] #35488: BaseModelFormSet.validate_unique() raises unhashable type error for unique fields with unhashable types

2024-05-29 Thread Django
#35488: BaseModelFormSet.validate_unique() raises unhashable type error for 
unique
fields with unhashable types
-+-
 Reporter:  Hanne Moa|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Forms|  Version:  5.0
 Severity:  Normal   |   Resolution:
 Keywords:  JSONField, unique,   | Triage Stage:  Accepted
  formset, json, hashable|
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by Simon Charette):

 * easy:  0 => 1

Comment:

 Marking as ''easy picking'' as all that is required here is likely to
 submit a PR with the change above to use `make_hashable` and add a test
 similar to the one added in 06a11ef6ecf324db0a1530b8cca727883698f442 but
 using a `form.JSONField` instead.

 It might be a good one to pick up if you've never contributed to Django
 Hanne!
-- 
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/0107018fc6a525fd-8ddb5fd2-4d3c-4924-9cee-370139252663-00%40eu-central-1.amazonses.com.


Re: [Django] #35490: Writing your first Django app, part 3

2024-05-29 Thread Django
#35490: Writing your first Django app, part 3
---+--
 Reporter:  Michael Huis   |Owner:  sammy20d
 Type:  Bug|   Status:  closed
Component:  Documentation  |  Version:  5.0
 Severity:  Normal |   Resolution:  invalid
 Keywords:  tutorial03 | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by Tim Graham):

 * component:  Uncategorized => Documentation
 * resolution:   => invalid
 * status:  assigned => closed
 * type:  Cleanup/optimization => Bug

Comment:

 The polls prefix comes from `mysite/urls.py`. See tutorial 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/0107018fc6953cde-86f27236-4e87-4559-b492-06b4f7c6e161-00%40eu-central-1.amazonses.com.


Re: [Django] #35490: Writing your first Django app, part 3

2024-05-29 Thread Django
#35490: Writing your first Django app, part 3
-+-
 Reporter:  Michael Huis |Owner:  sammy20d
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  Uncategorized|  Version:  5.0
 Severity:  Normal   |   Resolution:
 Keywords:  tutorial03   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by sammy20d):

 * owner:  nobody => sammy20d
 * 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/0107018fc64ec883-bea81618-8e48-4826-a662-c7b7c8a7cc53-00%40eu-central-1.amazonses.com.


Re: [Django] #35467: Prefer urlsplit() over urlparse()

2024-05-29 Thread Django
#35467: Prefer urlsplit() over urlparse()
-+-
 Reporter:  Adam Johnson |Owner:  Jake
 Type:   |  Howard
  Cleanup/optimization   |   Status:  closed
Component:  Utilities|  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 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/0107018fc63c51ea-d4c85c47-a54e-4184-a344-52c7672d6f84-00%40eu-central-1.amazonses.com.


Re: [Django] #35461: Tutorial instructions for adding django-debug-toolbar are misleading.

2024-05-29 Thread Django
#35461: Tutorial instructions for adding django-debug-toolbar are misleading.
-+-
 Reporter:  dawbert  |Owner:  Saksham
 Type:   |  Mathur
  Cleanup/optimization   |   Status:  assigned
Component:  Documentation|  Version:  5.0
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * cc: Mariusz Felisiak (added)
 * type:  Bug => Cleanup/optimization

Comment:

 This was already raised and clarified in tutorial 3:

 ''"To make the tutorial shorter, all template examples use incomplete
 HTML. In your own projects you should use complete HTML documents."''

 Check out 26be53dd89cef46746b4a67cbc0bb29665e999a6.
-- 
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/0107018fc6169818-1df3e4cf-af43-4790-b043-8acdb1b334c2-00%40eu-central-1.amazonses.com.


Re: [Django] #35467: Prefer urlsplit() over urlparse()

2024-05-29 Thread Django
#35467: Prefer urlsplit() over urlparse()
-+-
 Reporter:  Adam Johnson |Owner:  Jake
 Type:   |  Howard
  Cleanup/optimization   |   Status:  closed
Component:  Utilities|  Version:  dev
 Severity:  Normal   |   Resolution:  fixed
 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 Mariusz Felisiak):

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

Comment:

 Fixed by ff308a06047cd60806d604a7cf612e5656ee2ac9
-- 
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/0107018fc610c592-f33e0cee-5f0f-498c-abcd-3d933436e273-00%40eu-central-1.amazonses.com.


[Django] #35490: Writing your first Django app, part 3

2024-05-29 Thread Django
#35490: Writing your first Django app, part 3
-+-
   Reporter:  Michael|  Owner:  nobody
  Huis   |
   Type: | Status:  new
  Cleanup/optimization   |
  Component: |Version:  5.0
  Uncategorized  |
   Severity:  Normal |   Keywords:  tutorial03
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 I think the code in a example needs to be adjusted.

 Under "Writing more views¶"

 from django.urls import path

 from . import views

 urlpatterns = [
 # ex: /polls/
 path("", views.index, name="index"),
 # ex: /polls/5/
 path("/", views.detail, name="detail"),
 # ex: /polls/5/results/
 path("/results/", views.results, name="results"),
 # ex: /polls/5/vote/
 path("/vote/", views.vote, name="vote"),
 ]

 I think it should be:

 from django.urls import path

 from . import views

 urlpatterns = [
 # ex: /polls/
 path("", views.index, name="index"),
 # ex: /polls/5/
 path("**polls/**/", views.detail, name="detail"),
 # ex: /polls/5/results/
 path("**polls/**/results/", views.results,
 name="results"),
 # ex: /polls/5/vote/
 path("**polls/**/vote/", views.vote, name="vote"),
 ]

 the polls page wasnt 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/0107018fc607509e-c0ad446a-bc05-4e5f-a81a-93be3e4fe0e8-00%40eu-central-1.amazonses.com.


Re: [Django] #35489: Misalignment in raw ID fields

2024-05-29 Thread Django
#35489: Misalignment in raw ID fields
-+-
 Reporter:  Sam Galambos |Owner:  (none)
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  contrib.admin|  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:  admin raw foreign| Triage Stage:  Accepted
  key alignment  |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  1
-+-
Changes (by sammy20d):

 * owner:  sammy20d => (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/0107018fc5a10d57-5323f4f9-46eb-4f56-b502-ad5f3dce50f1-00%40eu-central-1.amazonses.com.


Re: [Django] #35489: Misalignment in raw ID fields

2024-05-29 Thread Django
#35489: Misalignment in raw ID fields
-+-
 Reporter:  Sam Galambos |Owner:  sammy20d
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  contrib.admin|  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:  admin raw foreign| Triage Stage:  Accepted
  key alignment  |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  1
-+-
Changes (by Natalia Bidart):

 * stage:  Unreviewed => Accepted
 * type:  Bug => Cleanup/optimization
 * version:  4.2 => dev

Comment:

 Hello Sam! Thank you for your report!

 I'm pretty sure there was a past ticket or PR about this issue but I have
 searched using all the keywords I could think and I can't find it, so I'm
 tentatively accepting this ticket.

 Looking forward to your contribution!
-- 
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/0107018fc58c5439-d42e817a-1165-4223-aa15-2ef3bcf75176-00%40eu-central-1.amazonses.com.


Re: [Django] #35489: Misalignment in raw ID fields

2024-05-29 Thread Django
#35489: Misalignment in raw ID fields
-+-
 Reporter:  Sam Galambos |Owner:  sammy20d
 Type:  Bug  |   Status:  assigned
Component:  contrib.admin|  Version:  4.2
 Severity:  Normal   |   Resolution:
 Keywords:  admin raw foreign| Triage Stage:
  key alignment  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  1
-+-
Changes (by sammy20d):

 * owner:  nobody => sammy20d
 * 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/0107018fc586f632-273cda4d-d0d5-4e76-aa29-0cbf12cc5f5a-00%40eu-central-1.amazonses.com.


Re: [Django] #35489: Misalignment in raw ID fields

2024-05-29 Thread Django
#35489: Misalignment in raw ID fields
-+-
 Reporter:  Licorice8464 |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  contrib.admin|  Version:  4.2
 Severity:  Normal   |   Resolution:
 Keywords:  admin raw foreign| Triage Stage:
  key alignment  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  1
-+-
Changes (by Licorice8464):

 * Attachment "Misaligned Foreign Key Field.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/0107018fc56e73b7-403f9aad-c057-4ceb-ac4f-28ae79a176ca-00%40eu-central-1.amazonses.com.


[Django] #35489: Misalignment in raw ID fields

2024-05-29 Thread Django
#35489: Misalignment in raw ID fields
-+-
   Reporter: |  Owner:  nobody
  Licorice8464   |
   Type:  Bug| Status:  new
  Component: |Version:  4.2
  contrib.admin  |   Keywords:  admin raw foreign
   Severity:  Normal |  key alignment
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  1
  UI/UX:  1  |
-+-
 The search icon and the text of raw foreign key fields in the admin seems
 to be misaligned starting in 4.2.
 I don't see any non-Django CSS in my own app that would be changing this,
 so if someone can confirm I'd be happy to submit a patch.
-- 
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/0107018fc56d8d09-266fe330-2e76-4938-960a-21c213981901-00%40eu-central-1.amazonses.com.


Re: [Django] #35488: BaseModelFormSet.validate_unique() raises unhashable type error for unique fields with unhashable types (was: BaseModelFormSet.validate_unique() raises TypeError unhashable type:

2024-05-29 Thread Django
#35488: BaseModelFormSet.validate_unique() raises unhashable type error for 
unique
fields with unhashable types
-+-
 Reporter:  Hanne Moa|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Forms|  Version:  5.0
 Severity:  Normal   |   Resolution:
 Keywords:  JSONField, unique,   | Triage Stage:  Accepted
  formset, json, hashable|
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Sarah Boyce):

 * summary:
 BaseModelFormSet.validate_unique() raises TypeError unhashable type:
 'dict' for JSONFields in a UniqueConstraint
 =>
 BaseModelFormSet.validate_unique() raises unhashable type error for
 unique fields with unhashable types

Comment:

 Yes I agree, thank you Simon 👍
-- 
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/0107018fc4d937bd-56bb80ff-1b78-48d2-8125-8eca3ac24e56-00%40eu-central-1.amazonses.com.


Re: [Django] #35488: BaseModelFormSet.validate_unique() raises TypeError unhashable type: 'dict' for JSONFields in a UniqueConstraint

2024-05-29 Thread Django
#35488: BaseModelFormSet.validate_unique() raises TypeError unhashable type: 
'dict'
for JSONFields in a UniqueConstraint
-+-
 Reporter:  Hanne Moa|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Forms|  Version:  5.0
 Severity:  Normal   |   Resolution:
 Keywords:  JSONField, unique,   | Triage Stage:  Accepted
  formset, json, hashable|
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Comment (by Simon Charette):

 I think this has little to do with #23964 (which focuses on
 `UniqueConstraint`) and is more of an analogous to #26819 (which was for
 another field using non-hashable types) but for `JSONField`.

 {{{#!diff
 diff --git a/django/forms/models.py b/django/forms/models.py
 index 4cda4e534e..42feeac5c2 100644
 --- a/django/forms/models.py
 +++ b/django/forms/models.py
 @@ -23,6 +23,7 @@
  SelectMultiple,
  )
  from django.utils.choices import BaseChoiceIterator
 +from django.utils.hashable import make_hashable
  from django.utils.text import capfirst, get_text_list
  from django.utils.translation import gettext
  from django.utils.translation import gettext_lazy as _
 @@ -835,7 +836,7 @@ def validate_unique(self):
  d._get_pk_val()
  if hasattr(d, "_get_pk_val")
  # Prevent "unhashable type: list" errors later
 on.
 -else tuple(d) if isinstance(d, list) else d
 +else make_hashable(d)
  )
  for d in row_data
  )
 }}}

 The problem IMO is that 06a11ef6ecf324db0a1530b8cca727883698f442 focused
 on one type on unhashable value instead of the generic problem.
-- 
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/0107018fc4c21059-b03f9a0f-bb83-42b0-94ca-496f0d522139-00%40eu-central-1.amazonses.com.


Re: [Django] #35488: BaseModelFormSet.validate_unique() raises TypeError unhashable type: 'dict' for JSONFields in a UniqueConstraint

2024-05-29 Thread Django
#35488: BaseModelFormSet.validate_unique() raises TypeError unhashable type: 
'dict'
for JSONFields in a UniqueConstraint
-+-
 Reporter:  Hanne Moa|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Forms|  Version:  5.0
 Severity:  Normal   |   Resolution:
 Keywords:  JSONField, unique,   | Triage Stage:  Accepted
  formset, json, hashable|
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Simon Charette):

 * keywords:  unique, UniqueConstraint, JSONField, json => JSONField,
 unique, formset, json, hashable

Comment:

 The problem happens to manifests itself for `JSONField` with
 `UniqueConstraint` but it happens for any field with a non-hashable value
 that has a unique constraint defined on it.

 e.g.

 {{{#!python
 class FooBar(models.Model):
 settings = models.JSONField(unique=True)
 }}}

 Would exhibit the same problem and the same could be said of `HStoreField`
 or other custom fields dealing with `dict`, `set`, and other non-hashable
 data types.

 Using `django.utils.make_hashable` in `BaseModelFormSet.validate_unique`
 seems like a potential low-lift solution but even this function can raise
 a `TypeError` if dealing with non-hashable value so maybe we're better off
 silencing these `TypeError` and let the model level unique constraint
 validation kick in.

 I think the latter would be a better approach because uniqueness on such
 fields cannot be determined at the Python level. For example, `JSONField`
 relies on the `jsonb` type on Postgres so the ordering of keys is not
 preserved which means that `{"foo": "bar", "bar": "foo"}` would be
 considered equal to `{"bar": "foo", "foo": "bar"}` but not on MySQL which
 `json` type is a basically `longtext` with JSON validation and preserves
 insertion order.
-- 
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/0107018fc487c7ce-250376e8-1cf5-4cac-8efd-b31b95a363ab-00%40eu-central-1.amazonses.com.


Re: [Django] #35488: BaseModelFormSet.validate_unique() raises TypeError unhashable type: 'dict' for JSONFields in a UniqueConstraint (was: Unexpected traceback: A JSONField being in a UniqueConstrain

2024-05-29 Thread Django
#35488: BaseModelFormSet.validate_unique() raises TypeError unhashable type: 
'dict'
for JSONFields in a UniqueConstraint
-+-
 Reporter:  Hanne Moa|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Forms|  Version:  5.0
 Severity:  Normal   |   Resolution:
 Keywords:  unique,  | Triage Stage:  Accepted
  UniqueConstraint, JSONField, json  |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Sarah Boyce):

 * component:  Uncategorized => Forms
 * stage:  Unreviewed => Accepted
 * summary:
 Unexpected traceback: A JSONField being in a UniqueConstraint is
 handled/documented poorly
 =>
 BaseModelFormSet.validate_unique() raises TypeError unhashable type:
 'dict' for JSONFields in a UniqueConstraint
 * type:  Uncategorized => Bug

Comment:

 This is different to #23964 but could be fixed as part of #23964.

 > Is it a design decision that JSONFields cannot be unique/in
 UniqueConstraints?

 No, looks like you have uncovered a bug specific to model formsets 👍
 thank you for the report
-- 
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/0107018fc481a5a4-eae76225-f918-40be-888a-85e02994a1d5-00%40eu-central-1.amazonses.com.


Re: [Django] #35487: Removal of CASCADE in DROP COLUMN migration operation

2024-05-29 Thread Django
#35487: Removal of CASCADE in DROP COLUMN migration operation
--+
 Reporter:  Petr Přikryl  |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Migrations|  Version:  dev
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Adam Johnson):

 * has_patch:  0 => 1
 * needs_better_patch:  0 => 1
 * stage:  Unreviewed => Accepted
 * type:  Uncategorized => Cleanup/optimization
 * version:  5.0 => dev

-- 
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/0107018fc3da468c-eb7d173d-26be-481d-bbd6-561c80d28955-00%40eu-central-1.amazonses.com.


Re: [Django] #28646: Migration calls "CREATE INDEX" when one already exists when 'unique' field attribute is added (PostgreSQL)

2024-05-29 Thread Django
#28646: Migration calls "CREATE INDEX" when one already exists when 'unique' 
field
attribute is added (PostgreSQL)
-+-
 Reporter:  Hari - 何瑞理|Owner:  bcail
 Type:  Bug  |   Status:  assigned
Component:  Migrations   |  Version:  1.11
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
  postgresql,migration,index,#djangocph|
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
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/0107018fc3d8a845-27ac5bff-a2fa-45ed-bdf5-6abda0bb9ea0-00%40eu-central-1.amazonses.com.


Re: [Django] #35487: Removal of CASCADE in DROP COLUMN migration operation

2024-05-29 Thread Django
#35487: Removal of CASCADE in DROP COLUMN migration operation
---+--
 Reporter:  Petr Přikryl   |Owner:  nobody
 Type:  Uncategorized  |   Status:  new
Component:  Migrations |  Version:  5.0
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by Adam Johnson):

 * cc: Adam Johnson (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/0107018fc3d406c3-2e1f0a56-1e27-4297-89fa-4c1c73bef530-00%40eu-central-1.amazonses.com.


Re: [Django] #35467: Prefer urlsplit() over urlparse()

2024-05-29 Thread Django
#35467: Prefer urlsplit() over urlparse()
-+-
 Reporter:  Adam Johnson |Owner:  Jake
 Type:   |  Howard
  Cleanup/optimization   |   Status:  assigned
Component:  Utilities|  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Jake Howard):

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

Comment:

 Comments addressed / replied-to in 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/0107018fc3c14442-63658fe7-9f2d-462e-8d97-4c1c10a50517-00%40eu-central-1.amazonses.com.


[Django] #35488: Unexpected traceback: A JSONField being in a UniqueConstraint is handled/documented poorly

2024-05-29 Thread Django
#35488: Unexpected traceback: A JSONField being in a UniqueConstraint is
handled/documented poorly
-+-
   Reporter:  Hanne Moa  |  Owner:  nobody
   Type: | Status:  new
  Uncategorized  |
  Component: |Version:  5.0
  Uncategorized  |   Keywords:  unique,
   Severity:  Normal |  UniqueConstraint, JSONField, json
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 Given a User based on AbstractUser and a model:

 {{{
 class DestinationConfig(model.Model):
 class Meta:
 constraints = [models.UniqueConstraint(fields=["user",
 "settings"], name="unique_destination_per_user")]

 user = models.ForeignKey(User, on_delete=models.CASCADE)
 settings = models.JSONField()
 }}}

 Admin like so:

 {{{
 from django.contrib import admin
 from django.contrib.auth.admin import UserAdmin as BaseUserAdmin

 class DestinationConfigInline(admin.TabularInline):
 model = DestinationConfig
 ordering = ["media", "label"]
 extra = 1

 def get_formset(self, request, obj=None, **kwargs):
 self.parent_obj = obj
 return super(DestinationConfigInline, self).get_formset(request,
 obj, **kwargs)

 def get_queryset(self, request):
 qs = super(DestinationConfigInline, self).get_queryset(request)
 return qs.filter(user=self.parent_obj)

 class UserAdmin(BaseUserAdmin):
 inlines = [DestinationConfigInline]

 admin.site.register(User, UserAdmin)
 }}}

 Then attempting to save a change to a specific user leads to a traceback
 like this:

 {{{
 Environment:


 Request Method: POST
 Request URL: https://ACENSORED.DOMAIN/admin/APP_auth/user/65/change/

 Django Version: 5.0.6
 Python Version: 3.10.12
 Installed Applications:
 ['channels',
  'django.contrib.admin',
  'django.contrib.auth',
  'django.contrib.contenttypes',
  'django.contrib.sessions',
  'django.contrib.messages',
  'django.contrib.staticfiles',
  'corsheaders',
  'social_django',
  'rest_framework',
  'rest_framework.authtoken',
  'drf_spectacular',
  'django_filters',
  'phonenumber_field',
  'argus.auth',
  'argus.incident',
  'argus.ws',
  'argus.notificationprofile',
  'argus.dev']
 Installed Middleware:
 ['django.middleware.security.SecurityMiddleware',
  'corsheaders.middleware.CorsMiddleware',
  'whitenoise.middleware.WhiteNoiseMiddleware',
  'django.contrib.sessions.middleware.SessionMiddleware',
  'django.middleware.common.CommonMiddleware',
  'django.middleware.csrf.CsrfViewMiddleware',
  'django.contrib.auth.middleware.AuthenticationMiddleware',
  'django.contrib.messages.middleware.MessageMiddleware',
  'django.middleware.clickjacking.XFrameOptionsMiddleware',
  'social_django.middleware.SocialAuthExceptionMiddleware',
  'django.contrib.auth.middleware.RemoteUserMiddleware']

 Traceback (most recent call last):
   File "/usr/local/lib/python3.10/site-
 packages/django/core/handlers/exception.py", line 55, in inner
 response = get_response(request)
   File "/usr/local/lib/python3.10/site-
 packages/django/core/handlers/base.py", line 197, in _get_response
 response = wrapped_callback(request, *callback_args,
 **callback_kwargs)
   File "/usr/local/lib/python3.10/site-
 packages/django/contrib/admin/options.py", line 688, in wrapper
 return self.admin_site.admin_view(view)(*args, **kwargs)
   File "/usr/local/lib/python3.10/site-
 packages/django/utils/decorators.py", line 134, in _wrapper_view
 response = view_func(request, *args, **kwargs)
   File "/usr/local/lib/python3.10/site-
 packages/django/views/decorators/cache.py", line 62, in _wrapper_view_func
 response = view_func(request, *args, **kwargs)
   File "/usr/local/lib/python3.10/site-
 packages/django/contrib/admin/sites.py", line 242, in inner
 return view(request, *args, **kwargs)
   File "/usr/local/lib/python3.10/site-
 packages/django/contrib/admin/options.py", line 1889, in change_view
 return self.changeform_view(request, object_id, form_url,
 extra_context)
   File "/usr/local/lib/python3.10/site-
 packages/django/utils/decorators.py", line 46, in _wrapper
 return bound_method(*args, **kwargs)
   File "/usr/local/lib/python3.10/site-
 packages/django/utils/decorators.py", line 134, in _wrapper_view
 response = view_func(request, *args, **kwargs)
   File "/usr/local/lib/python3.10/site-
 packages/django/contrib/admin/options.py", line 1747, in changeform_view
 return self._changeform_view(request, object_id, form_url,
 extra_context)
   File "/usr/local/lib/python3.10/site-
 packages/django/contrib/admin/op

Re: [Django] #35487: Removal of CASCADE in DROP COLUMN migration operation

2024-05-29 Thread Django
#35487: Removal of CASCADE in DROP COLUMN migration operation
---+--
 Reporter:  Petr Přikryl   |Owner:  nobody
 Type:  Uncategorized  |   Status:  new
Component:  Migrations |  Version:  5.0
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Comment (by Petr Přikryl):

 I have prepared PR: https://github.com/django/django/pull/18209
-- 
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/0107018fc3b0abbd-243a6ab6-d35c-4071-9014-fb298d60ed58-00%40eu-central-1.amazonses.com.


[Django] #35487: Removal of CASCADE in DROP COLUMN migration operation

2024-05-29 Thread Django
#35487: Removal of CASCADE in DROP COLUMN migration operation
-+
   Reporter:  Petr Přikryl   |  Owner:  nobody
   Type:  Uncategorized  | Status:  new
  Component:  Migrations |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  |
-+
 Created based on discussion in https://forum.djangoproject.com/t
 /removefield-dropping-views-without-notice/31409

 Arguments:
 * Consistency acrocss backends. Cascade is used for postgres backend only.
 * Cascade is no more needed as constraints and sequences are dropped
 explicitly.  Next, sequences are being replaced by new identity columns.
 * No side effects - unexpected removals in DB schema.
 * Test suite is passing after cascade removal.
-- 
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/0107018fc39b8ef5-717460f9-b8c1-4b8e-8d13-6878a15418db-00%40eu-central-1.amazonses.com.


Re: [Django] #35473: Typo in historic security advisory

2024-05-29 Thread Django
#35473: Typo in historic security advisory
-+-
 Reporter:  Darakian |Owner:  sammy20d
 Type:  Bug  |   Status:  closed
Component:  Documentation|  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:  1|UI/UX:  0
-+-
Changes (by Sarah Boyce <42296566+sarahboyce@…>):

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

Comment:

 In [changeset:"02dab94c7b8585c7ae3854465574d768e1df75d3" 02dab94]:
 {{{#!CommitTicketReference repository=""
 revision="02dab94c7b8585c7ae3854465574d768e1df75d3"
 Fixed #35473 -- Fixed CVE number in security archive.

 Updated to CVE-2009-3695 from CVE-2009-3965.
 }}}
-- 
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/0107018fc33e126c-d29c2027-c0a6-44a7-8cd6-99571d402dc5-00%40eu-central-1.amazonses.com.