Re: [Django] #29771: Support database-specific syntax for bulk_update

2018-10-04 Thread Django
#29771: Support database-specific syntax for bulk_update
-+-
 Reporter:  Tom Forbes   |Owner:  Tom
 Type:   |  Forbes
  Cleanup/optimization   |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 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 Tom Forbes):

 * cc: Tom Forbes (added)


Comment:

 I think the groundwork to this is quite difficult to lay. The current
 `SQLUpdateCompiler` is not suitable for this, I think.

 Also I believe we can mimic this on SQLLite:

 {{{
 WITH test(id) AS (SELECT 1 UNION ALL SELECT 2)
 UPDATE demo
 SET name=(select id from test where id=demo.id)
 WHERE id IN (select id from test)
 }}}

 Whether or not this is faster is something I'm not sure of. I believe the
 MySQL syntax will be faster, and there is no SQL standard way of doing
 this (I believe?), so we are left with a number of pretty different
 workarounds. I'm not sure how to structure this nicely.

 I can maybe hack Postgres support into the SQLUpdateCompiler, but it's
 really not nice. We have to create all the aliases ourselves, manage the
 different column names, etc etc.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/061.097e08da53d2096727e0cbd2765a793c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29771: Support database-specific syntax for bulk_update

2018-10-04 Thread Django
#29771: Support database-specific syntax for bulk_update
-+-
 Reporter:  Tom Forbes   |Owner:  Tom
 Type:   |  Forbes
  Cleanup/optimization   |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 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 Tom Forbes):

 * owner:  nobody => Tom Forbes
 * 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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/061.74aff41ff8ffe0b42a775e17482cc78b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29825: ngettext returns invalid result if msgstr is also a valid msgid in the same catalog

2018-10-04 Thread Django
#29825: ngettext returns invalid result if msgstr is also a valid msgid in the 
same
catalog
-+-
 Reporter:  jeremy-moffitt   |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Uncategorized|  Version:  2.1
 Severity:  Normal   |   Resolution:
 Keywords:  ngettext | Triage Stage:
  localization   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Description changed by jeremy-moffitt:

Old description:

> When ngettext is called with a msgid and that msgid has a msgstr that is
> also a valid msgid in the same catalog, the return value is not the
> msgstr, but instead is a single character from the msgstr. The problem
> seems to be that the msgstr is passed back into ngettext and since it has
> a valid value in the catalog, the code breaks into the else block and
> returns the 0 index character...
>
> django.ngettext = function(singular, plural, count) {
>   var value = django.catalog[singular];
>   if (typeof(value) == 'undefined') {
> return (count == 1) ? singular : plural;
>   } else {
> return value[django.pluralidx(count)];
>   }
> };
>
> The example in OpenStack Horizon (see link below) is that the French
> bundle contains the following:
> msgid "Image"
> msgstr "Image"
>
> This should return "Image" ... instead it returns "I" ... the result of
> django.catalog["Image"] being "Image" , which then breaks into the else
> block of the following if statement, resulting in a return value of
> "Image"[0] ... or the capital letter "I". For languages where the msgstr
> does not match a valid key in the file, this problem does not occur.
>
> see also openstack bug: https://bugs.launchpad.net/horizon/+bug/1778189

New description:

 When ngettext is called with a msgid and that msgid has a msgstr that is
 also a valid msgid in the same catalog, the return value is not the
 msgstr, but instead is a single character from the msgstr. The problem
 seems to be that the msgstr is passed back into ngettext and since it has
 a valid value in the catalog, the code breaks into the else block and
 returns the 0 index character...

 {{{#!python
 django.ngettext = function(singular, plural, count) {
   var value = django.catalog[singular];
   if (typeof(value) == 'undefined') {
 return (count == 1) ? singular : plural;
   } else {
 return value[django.pluralidx(count)];
   }
 };
 }}}

 The example in OpenStack Horizon (see link below) is that the French
 bundle contains the following:
 msgid "Image"
 msgstr "Image"

 This should return "Image" ... instead it returns "I" ... the result of
 django.catalog["Image"] being "Image" , which then breaks into the else
 block of the following if statement, resulting in a return value of
 "Image"[0] ... or the capital letter "I". For languages where the msgstr
 does not match a valid key in the file, this problem does not occur.

 see also openstack bug: https://bugs.launchpad.net/horizon/+bug/1778189

--

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.2b9ba3083ef8e897f03e0b602448652b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #29825: ngettext returns invalid result if msgstr is also a valid msgid in the same catalog

2018-10-04 Thread Django
#29825: ngettext returns invalid result if msgstr is also a valid msgid in the 
same
catalog
-+-
   Reporter:  jeremy-|  Owner:  nobody
  moffitt|
   Type: | Status:  new
  Uncategorized  |
  Component: |Version:  2.1
  Uncategorized  |   Keywords:  ngettext
   Severity:  Normal |  localization
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 When ngettext is called with a msgid and that msgid has a msgstr that is
 also a valid msgid in the same catalog, the return value is not the
 msgstr, but instead is a single character from the msgstr. The problem
 seems to be that the msgstr is passed back into ngettext and since it has
 a valid value in the catalog, the code breaks into the else block and
 returns the 0 index character...

 django.ngettext = function(singular, plural, count) {
   var value = django.catalog[singular];
   if (typeof(value) == 'undefined') {
 return (count == 1) ? singular : plural;
   } else {
 return value[django.pluralidx(count)];
   }
 };

 The example in OpenStack Horizon (see link below) is that the French
 bundle contains the following:
 msgid "Image"
 msgstr "Image"

 This should return "Image" ... instead it returns "I" ... the result of
 django.catalog["Image"] being "Image" , which then breaks into the else
 block of the following if statement, resulting in a return value of
 "Image"[0] ... or the capital letter "I". For languages where the msgstr
 does not match a valid key in the file, this problem does not occur.

 see also openstack bug: https://bugs.launchpad.net/horizon/+bug/1778189

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/057.2f2b93c414c0226b914a78cc8121792b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #10919: Add an option to disable display of related items on admin's delete confirmation page (to prevent large memory usage on complex objects)

2018-10-04 Thread Django
#10919: Add an option to disable display of related items on admin's delete
confirmation page (to prevent large memory usage on complex objects)
+
 Reporter:  Tobias McNulty  |Owner:  nobody
 Type:  New feature |   Status:  new
Component:  contrib.admin   |  Version:  master
 Severity:  Normal  |   Resolution:
 Keywords:  admin memory limit  | Triage Stage:  Accepted
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+
Changes (by Sergii Lapin):

 * cc: Sergii Lapin (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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.b3fb1f4e1f26f05f5f97b1f639c1e213%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #10919: Add an option to disable display of related items on admin's delete confirmation page (to prevent large memory usage on complex objects)

2018-10-04 Thread Django
#10919: Add an option to disable display of related items on admin's delete
confirmation page (to prevent large memory usage on complex objects)
+
 Reporter:  Tobias McNulty  |Owner:  nobody
 Type:  New feature |   Status:  new
Component:  contrib.admin   |  Version:  master
 Severity:  Normal  |   Resolution:
 Keywords:  admin memory limit  | Triage Stage:  Accepted
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+

Comment (by Sergii Lapin):

 Actually, removing **deleted_objects** from **context** doesn't prevent
 from collecting related items by
 **django.contrib.admin.utils.NestedObjects** in
 **django.contrib.admin.utils.get_deleted_objects**
 Maybe it better off to override **get_deleted_objects** function (Django
 2+ has this method inside AdminModel class). But there appears new issue:
 How to check permissions and protected foreign keys for related items?..

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.286be4f37064c3d03ff65eb6a49c11bc%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29823: Incorrect Decimal handling in Sum queries

2018-10-04 Thread Django
#29823: Incorrect Decimal handling in Sum queries
-+-
 Reporter:  Jurica Železnjak |Owner:  Sergey
 |  Fedoseev
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  2.1
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Sergey Fedoseev):

 * owner:  nobody => Sergey Fedoseev
 * 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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.2dfc86fc2bb114f3887f8b1060b208fb%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29820: Remove unused, undocumented, and unnecessary dummy template backend

2018-10-04 Thread Django
#29820: Remove unused, undocumented, and unnecessary dummy template backend
-+-
 Reporter:  Jon Dufresne |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Template system  |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham):

 I think the dummy backends have some usefulness. It seems to me we need
 some way to represent "nothing configured" for things like database,
 email, and cache.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.e2826638c7515c597045bbbddfdb5443%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #12990: Add JSONField model field

2018-10-04 Thread Django
#12990: Add JSONField model field
-+-
 Reporter:  paltman  |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 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 Simon Charette):

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


Comment:

 I believe the next step is to come up with a compatibility table of all
 supported database types and which lookups we want to support.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.fe270596b1dcd29dd7fea1a13f6d7598%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28690: django.utils.http.parse_http_date two digit year check is incorrect

2018-10-04 Thread Django
#28690: django.utils.http.parse_http_date two digit year check is incorrect
-+-
 Reporter:  Mads Jensen  |Owner:  Alexander
 |  Vyushkov
 Type:  Bug  |   Status:  assigned
Component:  Utilities|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  1|UI/UX:  0
-+-

Comment (by Tameesh Biswas):

 As this issue hasn't received any updates in the last 6 months, may I work
 on this 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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.4357f3dbe4c0de4297efb3216d243db5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29775: custom url converters are not picked up on reverse when part of included patterns with namespace

2018-10-04 Thread Django
#29775: custom url converters are not picked up on reverse when part of included
patterns with namespace
-+-
 Reporter:  Eric Brandwein   |Owner:  Eric
 |  Brandwein
 Type:  Bug  |   Status:  closed
Component:  Core (URLs)  |  Version:  master
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  converter,   | Triage Stage:  Accepted
  namespace, reverse, include|
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham ):

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


Comment:

 In [changeset:"b0b4aac555711ae9116f9b54c24ec7e43a0971e9" b0b4aac5]:
 {{{
 #!CommitTicketReference repository=""
 revision="b0b4aac555711ae9116f9b54c24ec7e43a0971e9"
 Fixed #29775 -- Fixed URL converters in a nested namespaced path.

 When using include() without namespaces of some urlpatterns that
 have an include() with namespace, the converters of the parent
 include() weren't being used to convert the arguments of reverse().
 }}}

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/071.1305e5c51b5d8a757b52275d05200aa1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29823: Incorrect Decimal handling in Sum queries

2018-10-04 Thread Django
#29823: Incorrect Decimal handling in Sum queries
-+-
 Reporter:  Jurica Železnjak |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  2.1
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham):

 I had the same thought, however, the issue persists after updating the
 test to use Decimals.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.afa9b790db28ed56b8f32987e1fe6779%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #12990: Add JSONField model field (was: New Field Type: JSONField)

2018-10-04 Thread Django
#12990: Add JSONField model field
-+-
 Reporter:  paltman  |Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 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 Tim Graham):

 * needs_better_patch:  1 => 0
 * needs_tests:  1 => 0
 * version:  1.2-alpha => master
 * has_patch:  1 => 0
 * resolution:  wontfix => fixed
 * stage:  Design decision needed => Accepted


Comment:

 Reopening as per ticket:29821#comment: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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.087b4609b10678e16811300eaa8d2301%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29821: Add JSONField for all supported DBs (and move into core).

2018-10-04 Thread Django
#29821: Add JSONField for all supported DBs (and move into core).
-+-
 Reporter:  Vackar Afzal |Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  duplicate
 Keywords:  Oracle Json  | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

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


Comment:

 Duplicate of #12990 which I reopened.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.18b052409db346970132e45fad9649ed%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27801: Make createsuperuser inspect environment variables for username and password

2018-10-04 Thread Django
#27801: Make createsuperuser inspect environment variables for username and
password
---+-
 Reporter:  Markus Holtermann  |Owner:  James Pic
 Type:  New feature|   Status:  assigned
Component:  contrib.auth   |  Version:  master
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  1
  Needs tests:  1  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+-
Changes (by Tim Graham):

 * needs_docs:  0 => 1
 * easy:  1 => 0
 * needs_tests:  0 => 1


Comment:

 Not sure if that would completely address the ticket, but the patch is
 incomplete without tests and documentation.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.033b014e2dd4056617cdd5e6ef4765fc%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29823: Incorrect Decimal handling in Sum queries

2018-10-04 Thread Django
#29823: Incorrect Decimal handling in Sum queries
-+-
 Reporter:  Jurica Železnjak |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  2.1
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Claude Paroz):

 I think that this new behavior is correct and related to float-to-decimal
 conversion. The difference stems from the way you initialize the decimal
 fields. You should use strings (`decimal_field='7.85'`) instead of floats
 (`decimal_field=7.85`).

 For example:
 {{{
 >>> from decimal import Decimal
 >>> Decimal(7.85)
 Decimal('7.8496447286321199499070644378662109375')
 >>> Decimal('7.85')
 Decimal('7.85')
 >>>
 }}}

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.7aa7b5788ef158c857dd8d6722859ff4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29824: Exclude using constraint

2018-10-04 Thread Django
#29824: Exclude using constraint
-+-
 Reporter:  Mads Jensen  |Owner:  Mads
 |  Jensen
 Type:  New feature  |   Status:  assigned
Component:  contrib.postgres |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  constraints  | Triage Stage:  Accepted
  postgres   |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Simon Charette):

 * needs_better_patch:  0 => 1
 * version:  2.1 => master
 * stage:  Unreviewed => Accepted


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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.4c315d4c90951be0e164a25998224f7a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27778: Update unicode documentation for Python 3

2018-10-04 Thread Django
#27778: Update unicode documentation for Python 3
-+-
 Reporter:  Aymeric Augustin |Owner:
 Type:   |  ChillarAnand
  Cleanup/optimization   |   Status:  assigned
Component:  Documentation|  Version:  master
 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
-+-

Comment (by Tim Graham ):

 In [changeset:"d1b25a64c21bd3649122dc991badf635e00dd2ae" d1b25a64]:
 {{{
 #!CommitTicketReference repository=""
 revision="d1b25a64c21bd3649122dc991badf635e00dd2ae"
 [2.1.x] Refs #27778 -- Removed "The database API" section from "Unicode
 data" docs.

 Support for passing bytestrings to the database API was removed in
 301de774c21d055e9e5a7073e5bffdb52bc71079.
 Backport of f5d9ee11a2c76ba1cf7e3424d15286da121a004b from master
 }}}

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.9d2c51bbdcb3f4f0d38f3dc4bf3482f3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29823: Incorrect Decimal handling in Sum queries

2018-10-04 Thread Django
#29823: Incorrect Decimal handling in Sum queries
-+-
 Reporter:  Jurica Železnjak |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  2.1
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Simon Charette):

 Confirmed the test passes on MySQL and PostgreSQL for me as well.

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.57401d5e4b1c5a75a1f80b1b24bacf03%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use to_field

2018-10-04 Thread Django
#29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use
to_field
---+
 Reporter:  Jonathan Nye   |Owner:  (none)
 Type:  Bug|   Status:  new
Component:  contrib.admin  |  Version:  2.0
 Severity:  Normal |   Resolution:
 Keywords:  autocomplete   | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+
Changes (by Johannes Hoppe):

 * owner:  Basu Dubey => (none)
 * status:  assigned => new


Comment:

 Replying to [comment:9 Constantino Schillebeeckx]:
 > I've put together a
 [https://github.com/ConstantinoSchillebeeckx/django/tree/fix-29138 bug
 fix] for this.
 >
 > '''Note''' I've been able to update all unit tests and create some new
 ones, however I haven't been able to leverage `to_field_allowed` to
 prevent data leaks. I've tried to implement it (see
 
[https://github.com/ConstantinoSchillebeeckx/django/blob/fix-29138/django/contrib/admin/views/autocomplete.py#L29
 here]), however I can't get it to play nicely with the unit tests. When
 uncommented, the `id_field` isn't properly being considered as
 to_field_allowed. I'm not familiar with this function, so could use some
 help troubleshooting.

 Hey there! Thanks for the work. It is a little hard to review since you
 only posted a branch and I don't know what commits to review. Could you
 maybe assign yourself and open up a pull-request to the Django repo? I
 will gladly do the first review.

 Best
 -Joe

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.dc03e296dcefbf046f65436dc4c33a4b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27778: Update unicode documentation for Python 3

2018-10-04 Thread Django
#27778: Update unicode documentation for Python 3
-+-
 Reporter:  Aymeric Augustin |Owner:
 Type:   |  ChillarAnand
  Cleanup/optimization   |   Status:  assigned
Component:  Documentation|  Version:  master
 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
-+-

Comment (by Tim Graham ):

 In [changeset:"f5d9ee11a2c76ba1cf7e3424d15286da121a004b" f5d9ee1]:
 {{{
 #!CommitTicketReference repository=""
 revision="f5d9ee11a2c76ba1cf7e3424d15286da121a004b"
 Refs #27778 -- Removed "The database API" section from "Unicode data"
 docs.

 Support for passing bytestrings to the database API was removed in
 301de774c21d055e9e5a7073e5bffdb52bc71079.
 }}}

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.51c157537eca0ac35725d4a61f22aefc%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29823: Incorrect Decimal handling in Sum queries

2018-10-04 Thread Django
#29823: Incorrect Decimal handling in Sum queries
-+-
 Reporter:  Jurica Železnjak |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  2.1
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

 * cc: Sergey Fedoseev (added)
 * severity:  Normal => Release blocker
 * stage:  Unreviewed => Accepted


Comment:

 Bisected to ebc4ee3369694e6dca5cf216d4176bdefd930fd6. The test only fails
 on SQLite for me, not on MySQL, PostgreSQL, or Oracle.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.9aa40b09eab506876724eec0d13abe87%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29822: Timezone-aware widget for admin site

2018-10-04 Thread Django
#29822: Timezone-aware widget for admin site
---+
 Reporter:  Paul Tiplady   |Owner:  nobody
 Type:  New feature|   Status:  new
Component:  contrib.admin  |  Version:  2.1
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+
Changes (by Tim Graham):

 * stage:  Someday/Maybe => Accepted


Comment:

 [https://groups.google.com/d/topic/django-
 developers/ti1wh0S_gLc/discussion django-developers discussion]. A reply
 from Aymeric suggests this might be feasible.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.0f475221ac1dd8a02373c104aa5bb0b8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28667: Documentation for extending UserCreationForm doesn't work with UserAdmin

2018-10-04 Thread Django
#28667: Documentation for extending UserCreationForm doesn't work with UserAdmin
-+-
 Reporter:  Nathanael Gordon |Owner:  Hampus
 Type:   |  Dunström
  Cleanup/optimization   |   Status:  assigned
Component:  contrib.auth |  Version:  1.11
 Severity:  Normal   |   Resolution:
 Keywords:  add_fieldsets| Triage Stage:  Accepted
  UserAdmin UserCreationForm Custom  |
  Auth User Model|
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-

Comment (by Hampus Dunström):

 I'm having a hard time creating a test app with a `UserCreationForm` for a
 model based on the `django.contrib.auth.admin.UserAdmin` class. Is this
 not the class. Is there any example code anyone can show me?

 > At the end of this section
 (​https://docs.djangoproject.com/en/1.11/topics/auth/customizing/#custom-
 users-and-the-built-in-auth-forms) it specifies that one can simply
 override the fields in the Meta of one's UserCreationForm.

 Above this example it is stated that it only works if the model is a
 simple subclass of `AbstractUser`. Do we want another example for
 `UserAdmin` or what are we looking for? Maybe I'm not the right person for
 this issue, I don't know. If any of you guys know anything or can clarify
 please let me know.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.2ef96fa8f802ee0197c356687e1e4ffe%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29824: Exclude using constraint

2018-10-04 Thread Django
#29824: Exclude using constraint
-+-
 Reporter:  Mads Jensen  |Owner:  Mads
 |  Jensen
 Type:  New feature  |   Status:  assigned
Component:  contrib.postgres |  Version:  2.1
 Severity:  Normal   |   Resolution:
 Keywords:  constraints  | Triage Stage:
  postgres   |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Description changed by Mads Jensen:

Old description:

> A lot of work was done to add the check constraint to Django 2.2. On top
> of such a constraint, PostgreSQL has an exclusion constraint that works
> well on ranges, regardless if they're represented using two fields, or a
> single field using a range-type. Essentially, this constraint enforces a
> unique constraint for ranges, with a possibility for an additional check.
>
> https://github.com/tbicr/django-pg-zero-downtime-migrations/ uses `ALTER
> TABLE %(table)s VALIDATE CONSTRAINT` to restrict how long the table is
> locked for writing. I was contemplating to touch this subject in the
> patch.

New description:

 A lot of work was done to add the check constraint to Django 2.2. On top
 of such a constraint, PostgreSQL has an exclusion constraint that works
 well on ranges, regardless if they're represented using two fields, or a
 single field using a range-type. Essentially, this constraint enforces a
 unique constraint for ranges, with a possibility for an additional check.

 https://github.com/tbicr/django-pg-zero-downtime-migrations/ uses `ALTER
 TABLE %(table)s VALIDATE CONSTRAINT` to restrict how long the table is
 locked for writing. I was contemplating to touch this subject in the
 patch.

 [https://github.com/django/django/pull/10478 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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.8781c709a4ccc49a3d0e7c8e6c791553%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #29824: Exclude using constraint

2018-10-04 Thread Django
#29824: Exclude using constraint
-+-
   Reporter:  Mads   |  Owner:  Mads Jensen
  Jensen |
   Type:  New| Status:  assigned
  feature|
  Component: |Version:  2.1
  contrib.postgres   |   Keywords:  constraints
   Severity:  Normal |  postgres
   Triage Stage: |  Has patch:  1
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 A lot of work was done to add the check constraint to Django 2.2. On top
 of such a constraint, PostgreSQL has an exclusion constraint that works
 well on ranges, regardless if they're represented using two fields, or a
 single field using a range-type. Essentially, this constraint enforces a
 unique constraint for ranges, with a possibility for an additional check.

 https://github.com/tbicr/django-pg-zero-downtime-migrations/ uses `ALTER
 TABLE %(table)s VALIDATE CONSTRAINT` to restrict how long the table is
 locked for writing. I was contemplating to touch this subject in the
 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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/053.551b05ec0216e631d9b79c26ffa8851e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29750: Add a pre-dispatch() hook for class-based views

2018-10-04 Thread Django
#29750: Add a pre-dispatch() hook for class-based views
-+-
 Reporter:  François Freitag |Owner:  François
 |  Freitag
 Type:  New feature  |   Status:  assigned
Component:  Generic views|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  1
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Carlton Gibson):

 * 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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/073.c3cd91067857a6d7519715fe1af4ac3b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29823: Incorrect Decimal handling in Sum queries

2018-10-04 Thread Django
#29823: Incorrect Decimal handling in Sum queries
-+-
 Reporter:  Jurica Železnjak |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  2.1
  (models, ORM)  |
 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 Jurica Železnjak):

 Minimal test case:

 {{{
 # models.py
 from django.db import models


 class TestModel(models.Model):
 decimal_field = models.DecimalField(max_digits=10, decimal_places=2)
 }}}

 {{{
 # tests.py
 from decimal import Decimal

 from django.db.models import Sum
 from django.test import TestCase

 from decimal_test.models import TestModel


 class DecimalTest(TestCase):
 @classmethod
 def setUpClass(cls):
 super().setUpClass()
 TestModel.objects.bulk_create([
 TestModel(decimal_field=7.85),
 TestModel(decimal_field=-7),
 TestModel(decimal_field=19.85),
 TestModel(decimal_field=-7),
 TestModel(decimal_field=-5),
 TestModel(decimal_field=-7),
 TestModel(decimal_field=-0.85),
 TestModel(decimal_field=-0.85)
 ])

 def testSum(self):
 sum =
 TestModel.objects.all().aggregate(sum=Sum('decimal_field'))['sum']
 print(sum)
 assert sum == 0, 'Should be zero'
 assert sum == Decimal(0.00)
 }}}

 FYI. Just tested with mysql and sqlite as db, same issue.

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.ce39e2aeca8e3e0809d28b35a311ba24%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29823: Incorrect Decimal handling in Sum queries

2018-10-04 Thread Django
#29823: Incorrect Decimal handling in Sum queries
-+-
 Reporter:  Jurica Železnjak |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  2.1
  (models, ORM)  |
 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 Carlton Gibson):

 > Before Django 2.1.0 this worked properly.

 Any chance you could put that into a test case and bisect the regression?

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.842fca3e33c1a0c724c5cc2779c9f315%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29818: ValueError when parsing querydata to autofill a Django admin form

2018-10-04 Thread Django
#29818: ValueError when parsing querydata to autofill a Django admin form
---+--
 Reporter:  NastuzziSamy   |Owner:  nobody
 Type:  Bug|   Status:  closed
Component:  contrib.admin  |  Version:  2.1
 Severity:  Normal |   Resolution:  needsinfo
 Keywords:  django admin   | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by Carlton Gibson):

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


Comment:

 > When giving a pure string instead of an expected integer ...

 I couldn't reproduce this.

 * When using the expected integer the field is pre-populated with the
 correct value.
 * When using a string (which is clearly invalid) the form renders
 normally, without a pre-populated value.

 I don't see a crash.

 Thus there must be something else going on in your situation. If you are
 able to pin it down to a concrete reproduce case we can investigate.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/070.c4cffdc9dca04e431c73a417e989f01b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29823: Incorrect Decimal handling in Sum queries

2018-10-04 Thread Django
#29823: Incorrect Decimal handling in Sum queries
-+-
 Reporter:  Jurica Železnjak |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  2.1
  (models, ORM)  |
 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
-+-
Description changed by Jurica Železnjak:

Old description:

> When doing `Sum` aggregate or annotate query on a `DecimalField` the
> result is a close-to-zero float (scientific notation) when it should be
> zero.
>
> For example: 8 records, with following values: `7.85`, `-7`, `19.85`,
> `-7`, `-5`, `-7`, `-0.85`, `-0.85`
> Aggregate Sum query on this column should equal `Decimal('0.00')`, but
> I'm getting Decimal('1.77635683940025E-15')
>
> Before Django 2.1.0 this worked properly.

New description:

 When doing `Sum` aggregate or annotate query on a `DecimalField` the
 result is a close-to-zero float (scientific notation) when it should be
 zero.

 For example: 8 records, with following values: `7.85`, `-7`, `19.85`,
 `-7`, `-5`, `-7`, `-0.85`, `-0.85`
 Aggregate Sum query on this column should equal `Decimal('0.00')`, but I'm
 getting `Decimal('1.77635683940025E-15')`.

 Before Django 2.1.0 this worked properly.

--

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.33bc518578b39a347b124af2eb02103a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #29823: Incorrect Decimal handling in Sum queries

2018-10-04 Thread Django
#29823: Incorrect Decimal handling in Sum queries
-+-
   Reporter:  Jurica |  Owner:  nobody
  Železnjak  |
   Type:  Bug| Status:  new
  Component:  Database   |Version:  2.1
  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  |
-+-
 When doing `Sum` aggregate or annotate query on a `DecimalField` the
 result is a close-to-zero float (scientific notation) when it should be
 zero.

 For example: 8 records, with following values: `7.85`, `-7`, `19.85`,
 `-7`, `-5`, `-7`, `-0.85`, `-0.85`
 Aggregate Sum query on this column should equal `Decimal('0.00')`, but I'm
 getting Decimal('1.77635683940025E-15')

 Before Django 2.1.0 this worked properly.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/049.e5b6abf5f6cad5d97b6c6452ffd0a866%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #13089: Support Negative Indexing on QuerySets

2018-10-04 Thread Django
#13089: Support Negative Indexing on QuerySets
-+-
 Reporter:  Adam Nelson  |Owner:  nobody
 Type:  Uncategorized|   Status:  closed
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:  feature  | Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Daniel Hahler):

 Just for reference: it was discussed on the mailing list at
 https://groups.google.com/d/msg/django-
 developers/x86iWFnZiik/wyeI5woWkVYJ.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.706d2049c758968ebaea63cb3d3b2f51%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29817: Deprecate FILE_CHARSET setting

2018-10-04 Thread Django
#29817: Deprecate FILE_CHARSET setting
-+-
 Reporter:  Jon Dufresne |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Core (Other) |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Carlton Gibson):

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


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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.c473c2a059f63f8dc1a95a3260841c40%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29821: Add JSONField for all supported DBs (and move into core).

2018-10-04 Thread Django
#29821: Add JSONField for all supported DBs (and move into core).
-+-
 Reporter:  Vackar Afzal |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  Oracle Json  | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Carlton Gibson):

 * stage:  Unreviewed => Accepted


Comment:

 (I think this is legitimate, even if a DEP is needed before
 implementation. Thus Accepting. Please adjust if that's the wrong flow.)

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.dbe562a7bc9e54cc9a87c6929066110e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29817: Deprecate FILE_CHARSET setting

2018-10-04 Thread Django
#29817: Deprecate FILE_CHARSET setting
-+-
 Reporter:  Jon Dufresne |Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Core (Other) |  Version:  master
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Carlton Gibson):

 So the discussion evolve such that it looks like the only issue here would
 be enforcing the use of UTF-8 in editors (for template files etc).

 Is that something we want to do? (Not, as yet, answers on the thread re
 that.)

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.f48fc4c4daf732d935c8dc4d59118380%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29077: [Help] Why JSONField for MySql/MariaDB etc are not supported in Django?

2018-10-04 Thread Django
#29077: [Help] Why JSONField for MySql/MariaDB etc are not supported in Django?
+--
 Reporter:  Akhil Lawrence  |Owner:  nobody
 Type:  Uncategorized   |   Status:  closed
Component:  Uncategorized   |  Version:  2.0
 Severity:  Normal  |   Resolution:  invalid
 Keywords:  help| Triage Stage:  Unreviewed
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+--

Comment (by Carlton Gibson):

 Proposal for cross DB JSONField #29821

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/070.39fe20e2d6fc13c79c71dc83abb8cc8f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29821: Add JSONField for all supported DBs (and move into core). (was: Oracle Native JSON Field)

2018-10-04 Thread Django
#29821: Add JSONField for all supported DBs (and move into core).
-+-
 Reporter:  Vackar Afzal |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  Oracle Json  | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Carlton Gibson):

 * version:  2.0 => master


Comment:

 Hi Vackar.

 If you don't mind, I'm going to retitle this from "Oracle Native JSON
 Field".

 Adding a JSONField for all DBs has been discussed on the mailing list a
 couple of times:

 * https://groups.google.com/forum/#!topic/django-
 developers/sAgYOqBUvgI/discussion
 * https://groups.google.com/d/topic/django-
 developers/zfred27yVPg/discussion

 The main take-home there was:

 * "Yes +1"
 * May need to go through a formal DEP process to pin down details.
 * Can't just be serialising to a text blob under-the-hood.
 * Could be moved from contrib into core.

 This last is now viable on all supported DBs (I believe).

 You've provided an example for Oracle. The Django
 [https://pypi.python.org/pypi/django-mysql django-mysql] package does
 similar there.
 (Is there an SQLite option yet?)

 I think a candidate for inclusion in Django itself would need to handle
 all supported databases, rather than just the one.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.e3382ced64524fce4261ff789d196f54%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.