Re: [Django] #33901: non-deterministic collations doesn't work with Unique=True on Postgres13.3

2022-08-10 Thread Django
#33901: non-deterministic collations doesn't work with Unique=True on 
Postgres13.3
-+-
 Reporter:  Ed Chai  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:  collation unique | Triage Stage:  Accepted
  citext |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Ed Chai):

 Replying to [comment:3 Mariusz Felisiak]: Sure, I think i can make a pull
 request this week.
 > Replying to [comment:1 Simon Charette]:
 > > Could we have the Postgres schema editor not create these `opclass`
 indexes when a custom `db_collation` is specified until we get a consensus
 on #24082?
 >
 > Sounds good to me. Ed, would you like to prepare 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/010701828990bf2d-78558a5a-9005-42b4-ae1b-eb1d902e81b2-00%40eu-central-1.amazonses.com.


Re: [Django] #24363: Combine ALTER TABLE .. MODIFY statements for multiple columns into one statement.

2022-08-10 Thread Django
#24363: Combine ALTER TABLE .. MODIFY statements for multiple columns into one
statement.
-+-
 Reporter:  slachinger   |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Migrations   |  Version:  1.7
 Severity:  Normal   |   Resolution:
 Keywords:  Modify Field Column  | Triage Stage:
 |  Someday/Maybe
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by elonzh):

 * cc: elonzh (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/0107018288bf2d48-e60d7f19-ea4c-498c-b650-99585c191dfb-00%40eu-central-1.amazonses.com.


Re: [Django] #24203: Optimisation: adding multiple fields to same model should attempt to run single ALTER TABLE statement

2022-08-10 Thread Django
#24203: Optimisation: adding multiple fields to same model should attempt to run
single ALTER TABLE statement
-+-
 Reporter:  Peter Lauri  |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Migrations   |  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:  migration| Triage Stage:
 |  Someday/Maybe
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by elonzh):

 * cc: elonzh (removed)


-- 
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/0107018288befa1c-0d7676d0-6693-4e84-89d7-2bc06dbb07f8-00%40eu-central-1.amazonses.com.


Re: [Django] #24203: Optimisation: adding multiple fields to same model should attempt to run single ALTER TABLE statement

2022-08-10 Thread Django
#24203: Optimisation: adding multiple fields to same model should attempt to run
single ALTER TABLE statement
-+-
 Reporter:  Peter Lauri  |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Migrations   |  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:  migration| Triage Stage:
 |  Someday/Maybe
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by elonzh):

 * cc: elonzh (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/0107018288bea38b-e74f2939-1f41-4ab4-8db2-6d09d92e6db8-00%40eu-central-1.amazonses.com.


Re: [Django] #15130: Model.validate_unique method doesn't take in account multi-db

2022-08-10 Thread Django
#15130: Model.validate_unique method doesn't take in account multi-db
-+-
 Reporter:  Tetsuya Morimoto |Owner:  (none)
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.2
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  multi-db | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by François Granade):

 I got badly bitten by this bug in #33912, and I think that there are two
 issues, related but not the same, here -

 1) the current behavior (validating against the default database for
 object that live in another database) does not make sense
 2) it should be be possible to define against what DB the validation
 happens.

 To me, the first issue is a very serious bug, and the second a useful
 feature.

 What about fixing the first one first ? For that, the patch 15130.2.diff
 above would work.

 What would be needed for this patch to be accepted ? I can clean it up

-- 
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/0107018287cd4273-2dc0e85b-5e36-4928-b091-02743ebc3899-00%40eu-central-1.amazonses.com.


Re: [Django] #28975: Skip automatic creation of postgis extension if it already exists

2022-08-10 Thread Django
#28975: Skip automatic creation of postgis extension if it already exists
-+-
 Reporter:  sphrak   |Owner:  amureki
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  GIS  |  Version:  2.0
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  create extension,| Triage Stage:  Ready for
  postgis, psycopg2, postgresql  |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by GitHub ):

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


Comment:

 In [changeset:"8403da3696730f8b9e7d2ad20c920fcd7c52b62c" 8403da36]:
 {{{
 #!CommitTicketReference repository=""
 revision="8403da3696730f8b9e7d2ad20c920fcd7c52b62c"
 Fixed #28975 -- Made PostGIS backend skip extension creation if installed.
 }}}

-- 
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/010701828790e5fa-11b7a79b-3ba9-41e1-ab62-bbd05a77d0e9-00%40eu-central-1.amazonses.com.


Re: [Django] #28975: Skip automatic creation of postgis extension if it already exists

2022-08-10 Thread Django
#28975: Skip automatic creation of postgis extension if it already exists
-+-
 Reporter:  sphrak   |Owner:  amureki
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  GIS  |  Version:  2.0
 Severity:  Normal   |   Resolution:
 Keywords:  create extension,| Triage Stage:  Ready for
  postgis, psycopg2, postgresql  |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * has_patch:  0 => 1
 * stage:  Accepted => Ready for checkin


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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018287879c4a-f78b3528-58a7-415e-9d91-0b9ae427ef80-00%40eu-central-1.amazonses.com.


Re: [Django] #33912: In the admin, saving an object in a non-default DB with unique field fails when the default DB contains an object with the same unique field value but different PK

2022-08-10 Thread Django
#33912: In the admin, saving an object in a non-default DB with unique field 
fails
when the default DB contains an object with the same unique field value but
different PK
--+--
 Reporter:  François Granade  |Owner:  nobody
 Type:  Bug   |   Status:  closed
Component:  contrib.admin |  Version:  4.0
 Severity:  Normal|   Resolution:  duplicate
 Keywords:  admin multi-db| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--
Changes (by Mariusz Felisiak):

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


Comment:

 Duplicate of #15130. Please leave comments in the original ticket.

-- 
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/01070182876c2be4-b4c95786-25cb-4df7-9265-0edabb655681-00%40eu-central-1.amazonses.com.


Re: [Django] #33912: In the admin, saving an object in a non-default DB with unique field fails when the default DB contains an object with the same unique field value but different PK

2022-08-10 Thread Django
#33912: In the admin, saving an object in a non-default DB with unique field 
fails
when the default DB contains an object with the same unique field value but
different PK
--+--
 Reporter:  François Granade  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  contrib.admin |  Version:  4.0
 Severity:  Normal|   Resolution:
 Keywords:  admin multi-db| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--
Changes (by François Granade):

 * Attachment "patch_33912.diff" added.

 simple patch that fixes the problem. See comments on why it doesn't
 include a test (yet..)

-- 
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/01070182876a9e6d-f913e438-31f5-40de-85fe-8e7c57a0a5d9-00%40eu-central-1.amazonses.com.


Re: [Django] #33912: In the admin, saving an object in a non-default DB with unique field fails when the default DB contains an object with the same unique field value but different PK

2022-08-10 Thread Django
#33912: In the admin, saving an object in a non-default DB with unique field 
fails
when the default DB contains an object with the same unique field value but
different PK
--+--
 Reporter:  François Granade  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  contrib.admin |  Version:  4.0
 Severity:  Normal|   Resolution:
 Keywords:  admin multi-db| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--

Comment (by François Granade):

 indeed, that's the same issue as #15130 . I'm attaching a patch that fixes
 it , but it doesn't include a test.

 I can write a test to get the patch accepted, but I would need some
 guidance on writing the test: I cannot find example of tests that deal
 with the admin *and* with multiple database, so I don't know how to write
 it... Could someone with experience point me to some example of tests I
 could copy/reuse, or to a general idea of how to write a test on the admin
 with multiple databases ? Thanks in advance.

-- 
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/010701828769f3e0-c5d4697e-caf2-4897-a384-b0aaa0af6c1b-00%40eu-central-1.amazonses.com.


Re: [Django] #33912: In the admin, saving an object in a non-default DB with unique field fails when the default DB contains an object with the same unique field value but different PK (was: In the ad

2022-08-10 Thread Django
#33912: In the admin, saving an object in a non-default DB with unique field 
fails
when the default DB contains an object with the same unique field value but
different PK
--+--
 Reporter:  François Granade  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  contrib.admin |  Version:  4.0
 Severity:  Normal|   Resolution:
 Keywords:  admin multi-db| Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--
Changes (by François Granade):

 * keywords:  admin multidb => admin multi-db


Comment:

 This may be caused by (and somewhat a simple test case of)
 https://code.djangoproject.com/ticket/15130 ?

-- 
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/01070182874e33a6-89091029-1e1e-42f2-bb65-66aad0071a63-00%40eu-central-1.amazonses.com.


Re: [Django] #33895: Case() crashes with ~Q(pk__in=[]).

2022-08-10 Thread Django
#33895: Case() crashes with ~Q(pk__in=[]).
-+-
 Reporter:  shukryzablah |Owner:  David
 |  Wobrock
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  2.2
  (models, ORM)  |
 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
-+-

Comment (by GitHub ):

 In [changeset:"721706f4c40f4970f57647368d45f49e20028628" 721706f]:
 {{{
 #!CommitTicketReference repository=""
 revision="721706f4c40f4970f57647368d45f49e20028628"
 Refs #33895 -- Fixed Case() crash with filters that match everything in
 When() on Oracle.

 Follow up to 036bb2b74afb50a71e7a945e8dd83499b603ac3a.
 }}}

-- 
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/01070182874cbf75-3349e485-81b2-41ad-bb6f-afdcd16989a8-00%40eu-central-1.amazonses.com.


Re: [Django] #33912: In the admin, saving an object in a non-default database with unique field fails when the default database contains an object with the same unique field value but different PK

2022-08-10 Thread Django
#33912: In the admin, saving an object in a non-default database with unique 
field
fails when the default database contains an object with the same unique
field value but different PK
--+--
 Reporter:  François Granade  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  contrib.admin |  Version:  4.0
 Severity:  Normal|   Resolution:
 Keywords:  admin multidb | Triage Stage:  Unreviewed
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+--
Changes (by François Granade):

 * cc: François Granade (added)
 * keywords:   => admin multidb
 * component:  Uncategorized => contrib.admin
 * type:  Uncategorized => Bug


Old description:

> Reproducible using the test project in https://github.com/farialima
> /django-multidbbug . See README.md on how to run it.
>
> The steps are:
> - a model with a unique string field (beside the default int PK)
> - two DBs in the settings (`default` and `other`)
> - two objects in the default DB with PK 1 and 2, and some unique value
> for the unique string field
> - a object in the other DB (thus, with PK 1) with a different unique
> string field value
> - in `admin.py`, point the UI to the other database for the model (using
> https://docs.djangoproject.com/en/4.0/topics/db/multi-db/#exposing-
> multiple-databases-in-django-s-admin-interface)
> - in the admin, try modifying the object in the other DB, giving it the
> same unique string value as the object with PK 2 in the default database
>
> => saving fails with error "Parcel with this Tracking id already
> exists.", see screenshot.
>
> The underlying issue is clearly that the admin will try to verify in the
> default DB that the objects doesn't exist. I think that the admin should
> *not* look in the default DB, as I set it up to only use the 'other' DB
> for my model...
>

> ```
>  % poetry run ./manage.py shell
> (...)
> >>> from multidbbugapp.models import Parcel
> >>> print(Parcel.objects.all())
> ,  tracking_id=two>]>
> >>> print(Parcel.objects.using('other').all())
> ]>
> >>> o = Parcel.objects.using('other').first()
> >>> o
> 
> >>> o.tracking_id = 'two'
> >>> o.save()
> >>>
> ```

New description:

 Reproducible using the test project in https://github.com/farialima
 /django-multidbbug . See README.md on how to run it.

 The steps are:
 - a model with a unique string field (beside the default int PK)
 - two DBs in the settings (`default` and `other`)
 - two objects in the default DB with PK 1 and 2, and some unique value for
 the unique string field
 - a object in the other DB (thus, with PK 1) with a different unique
 string field value
 - in `admin.py`, point the UI to the other database for the model (using
 https://docs.djangoproject.com/en/4.0/topics/db/multi-db/#exposing-
 multiple-databases-in-django-s-admin-interface)
 - in the admin, try modifying the object in the other DB, giving it the
 same unique string value as the object with PK 2 in the default database

 => saving fails with error "Parcel with this Tracking id already exists.",
 see screenshot.

 The underlying issue is clearly that the admin will try to verify in the
 default DB that the objects doesn't exist. I think that the admin should
 *not* look in the default DB, as I set it up to only use the 'other' DB
 for my model...

 The issue only occurs in the admin, things are OK when editing the model
 objects in code:

 {{{
  % poetry run ./manage.py shell
 (...)
 >>> from multidbbugapp.models import Parcel
 >>> print(Parcel.objects.all())
 , ]>
 >>> print(Parcel.objects.using('other').all())
 ]>
 >>> o = Parcel.objects.using('other').first()
 >>> o
 
 >>> o.tracking_id = 'two'
 >>> o.save()
 >>>

 }}}

--

-- 
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/010701828749efee-a6cbe4a9-1d3b-4aff-bce1-34edc765eb8b-00%40eu-central-1.amazonses.com.


Re: [Django] #26029: Provide an API to configure arbitrary file storage backends

2022-08-10 Thread Django
#26029: Provide an API to configure arbitrary file storage backends
-+-
 Reporter:  Aymeric Augustin |Owner:  Jarosław
 |  Wygoda
 Type:  New feature  |   Status:  assigned
Component:  File |  Version:  dev
  uploads/storage|
 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:"04ec8bf92a0c3f3d89adbc38a187f972b8424941" 04ec8bf9]:
 {{{
 #!CommitTicketReference repository=""
 revision="04ec8bf92a0c3f3d89adbc38a187f972b8424941"
 [4.1.x] Refs #26029 -- Doc'd django.core.files.storage.default_storage.

 Backport of 9e7cb27a5b7363239d1db02d29fe12efdf25b899 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/010701828748d505-2bca-25cf-42cf-9f6c-93ccee8ad464-00%40eu-central-1.amazonses.com.


Re: [Django] #26029: Provide an API to configure arbitrary file storage backends

2022-08-10 Thread Django
#26029: Provide an API to configure arbitrary file storage backends
-+-
 Reporter:  Aymeric Augustin |Owner:  Jarosław
 |  Wygoda
 Type:  New feature  |   Status:  assigned
Component:  File |  Version:  dev
  uploads/storage|
 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:"9e7cb27a5b7363239d1db02d29fe12efdf25b899" 9e7cb27]:
 {{{
 #!CommitTicketReference repository=""
 revision="9e7cb27a5b7363239d1db02d29fe12efdf25b899"
 Refs #26029 -- Doc'd django.core.files.storage.default_storage.
 }}}

-- 
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/010701828748adc4-3d961e1e-3d16-45f9-8283-101240b33582-00%40eu-central-1.amazonses.com.


Re: [Django] #33912: In the admin, saving an object in a non-default database with unique field fails when the default database contains an object with the same unique field value but different PK

2022-08-10 Thread Django
#33912: In the admin, saving an object in a non-default database with unique 
field
fails when the default database contains an object with the same unique
field value but different PK
--+--
 Reporter:  François Granade  |Owner:  nobody
 Type:  Uncategorized |   Status:  new
Component:  Uncategorized |  Version:  4.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 François Granade):

 * Attachment "Screen Shot 2022-08-10 at 12.07.45 PM.png" added.

 screenshot of the error

-- 
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/0107018287466c39-bb634653-0526-4381-b9bd-04e3e4bef9a3-00%40eu-central-1.amazonses.com.


[Django] #33912: In the admin, saving an object in a non-default database with unique field fails when the default database contains an object with the same unique field value but different PK

2022-08-10 Thread Django
#33912: In the admin, saving an object in a non-default database with unique 
field
fails when the default database contains an object with the same unique
field value but different PK
+
   Reporter:  François Granade  |  Owner:  nobody
   Type:  Uncategorized | Status:  new
  Component:  Uncategorized |Version:  4.0
   Severity:  Normal|   Keywords:
   Triage Stage:  Unreviewed|  Has patch:  0
Needs documentation:  0 |Needs tests:  0
Patch needs improvement:  0 |  Easy pickings:  0
  UI/UX:  0 |
+
 Reproducible using the test project in https://github.com/farialima
 /django-multidbbug . See README.md on how to run it.

 The steps are:
 - a model with a unique string field (beside the default int PK)
 - two DBs in the settings (`default` and `other`)
 - two objects in the default DB with PK 1 and 2, and some unique value for
 the unique string field
 - a object in the other DB (thus, with PK 1) with a different unique
 string field value
 - in `admin.py`, point the UI to the other database for the model (using
 https://docs.djangoproject.com/en/4.0/topics/db/multi-db/#exposing-
 multiple-databases-in-django-s-admin-interface)
 - in the admin, try modifying the object in the other DB, giving it the
 same unique string value as the object with PK 2 in the default database

 => saving fails with error "Parcel with this Tracking id already exists.",
 see screenshot.

 The underlying issue is clearly that the admin will try to verify in the
 default DB that the objects doesn't exist. I think that the admin should
 *not* look in the default DB, as I set it up to only use the 'other' DB
 for my model...


 ```
  % poetry run ./manage.py shell
 (...)
 >>> from multidbbugapp.models import Parcel
 >>> print(Parcel.objects.all())
 , ]>
 >>> print(Parcel.objects.using('other').all())
 ]>
 >>> o = Parcel.objects.using('other').first()
 >>> o
 
 >>> o.tracking_id = 'two'
 >>> o.save()
 >>>
 ```

-- 
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/0107018287461f94-0abd7d62-9e97-4e36-b5b4-4fb582b065e1-00%40eu-central-1.amazonses.com.


Re: [Django] #28975: Skip automatic creation of postgis extension if it already exists

2022-08-10 Thread Django
#28975: Skip automatic creation of postgis extension if it already exists
-+-
 Reporter:  sphrak   |Owner:  amureki
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  GIS  |  Version:  2.0
 Severity:  Normal   |   Resolution:
 Keywords:  create extension,| Triage Stage:  Accepted
  postgis, psycopg2, postgresql  |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by amureki):

 Replying to [comment:16 Mariusz Felisiak]:
 > > Do you mind if I submit a PR and ask for your assistance?
 >
 > Of course not, please do.

 <3

 Not sure, how to modify this ticket to catch the new PR (as there already
 was one that is closed), but here is a link:
 https://github.com/django/django/pull/15941

-- 
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/0107018286da6af4-c5fe3c93-da70-430b-8c6b-101831f49f9e-00%40eu-central-1.amazonses.com.


Re: [Django] #28975: Skip automatic creation of postgis extension if it already exists

2022-08-10 Thread Django
#28975: Skip automatic creation of postgis extension if it already exists
-+-
 Reporter:  sphrak   |Owner:  amureki
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  GIS  |  Version:  2.0
 Severity:  Normal   |   Resolution:
 Keywords:  create extension,| Triage Stage:  Accepted
  postgis, psycopg2, postgresql  |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Mariusz Felisiak):

 > Do you mind if I submit a PR and ask for your assistance?

 Of course not, please do.

-- 
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/0107018286d698d2-2f01a713-eef3-4d9e-933a-d6aceb0dfb1a-00%40eu-central-1.amazonses.com.


Re: [Django] #32114: Workaround for subtest issue with parallel test runner

2022-08-10 Thread Django
#32114: Workaround for subtest issue with parallel test runner
-+-
 Reporter:  Jordan Ephron|Owner:  (none)
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Testing framework|  Version:  3.1
 Severity:  Normal   |   Resolution:
 Keywords:  Test subtest | Triage Stage:  Accepted
  parallel   |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * owner:  Jonny Arnold => (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/0107018286d5b307-f121a5a1-09fb-4631-8342-c204801c0754-00%40eu-central-1.amazonses.com.


Re: [Django] #28975: Skip automatic creation of postgis extension if it already exists

2022-08-10 Thread Django
#28975: Skip automatic creation of postgis extension if it already exists
-+-
 Reporter:  sphrak   |Owner:  amureki
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  GIS  |  Version:  2.0
 Severity:  Normal   |   Resolution:
 Keywords:  create extension,| Triage Stage:  Accepted
  postgis, psycopg2, postgresql  |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by amureki):

 Replying to [comment:14 Mariusz Felisiak]:
 > Rust, Do you have time to work on this?

 I did prepare a patch. However, I am struggling with the tests a bit.
 Do you mind if I submit a PR and ask for your assistance?

-- 
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/0107018286d1ffd1-8069d3b9-47b9-4ea1-8142-d64ab90953fd-00%40eu-central-1.amazonses.com.


Re: [Django] #28975: Skip automatic creation of postgis extension if it already exists

2022-08-10 Thread Django
#28975: Skip automatic creation of postgis extension if it already exists
-+-
 Reporter:  sphrak   |Owner:  amureki
 Type:   |   Status:  assigned
  Cleanup/optimization   |
Component:  GIS  |  Version:  2.0
 Severity:  Normal   |   Resolution:
 Keywords:  create extension,| Triage Stage:  Accepted
  postgis, psycopg2, postgresql  |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Mariusz Felisiak):

 Rust, Do you have time to work on this?

-- 
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/0107018286d0c06e-7cec9d90-3e7e-4101-8379-3e3d58f534e2-00%40eu-central-1.amazonses.com.


Re: [Django] #33901: non-deterministic collations doesn't work with Unique=True on Postgres13.3

2022-08-10 Thread Django
#33901: non-deterministic collations doesn't work with Unique=True on 
Postgres13.3
-+-
 Reporter:  Ed Chai  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:  collation unique | Triage Stage:  Accepted
  citext |
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:1 Simon Charette]:
 > Could we have the Postgres schema editor not create these `opclass`
 indexes when a custom `db_collation` is specified until we get a consensus
 on #24082?

 Sounds good to me. Ed, would you like to prepare 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/0107018286cad65a-507b06de-ed8b-42c4-9dfa-3e47969fbd47-00%40eu-central-1.amazonses.com.


Re: [Django] #10686: Add class name interpolation in Meta.permissions codenames

2022-08-10 Thread Django
#10686: Add class name interpolation in Meta.permissions codenames
-+-
 Reporter:  faldridge|Owner:
 |  jul...@pinabausch.org
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  permissions  | Triage Stage:  Accepted
  inheritance|
Has patch:  1|  Needs documentation:  1
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * owner:  (none) => jul...@pinabausch.org
 * 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/010701828668e8e3-71fc8264-c0aa-4788-9d32-b114cefbe867-00%40eu-central-1.amazonses.com.


Re: [Django] #10686: Add class name interpolation in Meta.permissions codenames

2022-08-10 Thread Django
#10686: Add class name interpolation in Meta.permissions codenames
-+-
 Reporter:  faldridge|Owner:  (none)
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  permissions  | Triage Stage:  Accepted
  inheritance|
Has patch:  1|  Needs documentation:  1
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * needs_docs:  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/010701828668973f-8ffe48f7-8d6f-4e5f-ba7d-8226af92f91d-00%40eu-central-1.amazonses.com.