Re: [Django] #29066: Sum does not support __neg__

2018-01-25 Thread Django
#29066: Sum does not support __neg__
-+-
 Reporter:  Matthew Pava |Owner:  Priyansh
 |  Saxena
 Type:  Bug  |   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 Priyansh Saxena):

 * owner:  nobody => Priyansh Saxena
 * 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.ff3211beecff81208251a83f65ca4d2a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29067: QuerySet.values_list(..., flat=True) combined with .annotate() incorrectly includes the annotate columns

2018-01-25 Thread Django
#29067: QuerySet.values_list(..., flat=True) combined with .annotate() 
incorrectly
includes the annotate columns
-+-
 Reporter:  Jon Dufresne |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  2.0
  (models, ORM)  |
 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 Jon Dufresne):

 * has_patch:  0 => 1


Comment:

 https://github.com/django/django/pull/9623

-- 
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.960cd2140d1550a8bc5e72a58f4417b1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #29067: QuerySet.values_list(..., flat=True) combined with .annotate() incorrectly includes the annotate columns

2018-01-25 Thread Django
#29067: QuerySet.values_list(..., flat=True) combined with .annotate() 
incorrectly
includes the annotate columns
-+-
   Reporter:  Jon|  Owner:  nobody
  Dufresne   |
   Type:  Bug| Status:  new
  Component:  Database   |Version:  2.0
  layer (models, ORM)|
   Severity:  Normal |   Keywords:
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 Regression introduced in Django 2.0.

 In `FlatValuesListIterable.__iter__()`, can't assume the returned rows
 have a single column as using `.annotate()` may have added additional
 columns to the `SELECT`.

 Introduction bisected to commit 4dfd6b88d520b43b6363946e5ee58ba14cd1efe6.

-- 
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/052.4f5c489d991c4d22475a59cfd668a78f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29066: Sum does not support __neg__

2018-01-25 Thread Django
#29066: Sum does not support __neg__
-+-
 Reporter:  Matthew Pava |Owner:  nobody
 Type:  Bug  |   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):

 * stage:  Unreviewed => Accepted


Comment:

 I guess we could add support for `__neg__`, in the mean time `Sum('field')
 * -1` which goes through `__mul__` should work just fine.

-- 
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.3c99ba3617cdc90ca66e313607c9bf5d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28878: "pip install django" is broken on Python 2; can be fixed for most users with metadata

2018-01-25 Thread Django
#28878: "pip install django" is broken on Python 2; can be fixed for most users
with metadata
+
 Reporter:  Zac Hatfield Dodds  |Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Packaging   |  Version:  2.0
 Severity:  Release blocker |   Resolution:
 Keywords:  | Triage Stage:  Accepted
Has patch:  1   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+

Comment (by Zac Hatfield Dodds):

 Replying to [comment:6 Andy Grabow]:
 > BUT any python2 pip ist still trying to install django 2, because the
 packages currently uploaded to pypi need to be modified to also include
 this fix!

 We know - it's impossible to edit existing releases on PyPI, but
 [https://github.com/pypa/warehouse/issues/2170#issuecomment-360662369 I've
 asked for an admin to do it for us].  We'll see what happens.

-- 
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.7156bc83fc65b38bbf0aa55dd2f21b2f%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-01-25 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:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by Alexander Vyushkov):

 * needs_better_patch:  1 => 0


Comment:

 sent new pull request

-- 
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.12432a94c928ebf74af801ce03b4204e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28878: "pip install django" is broken on Python 2; can be fixed for most users with metadata

2018-01-25 Thread Django
#28878: "pip install django" is broken on Python 2; can be fixed for most users
with metadata
+
 Reporter:  Zac Hatfield Dodds  |Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Packaging   |  Version:  2.0
 Severity:  Release blocker |   Resolution:
 Keywords:  | Triage Stage:  Accepted
Has patch:  1   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+
Changes (by Andy Grabow):

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


Comment:

 After researching for quite a while, i found this ticket and that the
 actual problem has been kinda solved with django 2.0.1 (without mentioning
 it in the release notes tho).
 BUT any python2 pip ist still trying to install django 2, because the
 packages currently uploaded to pypi need to be modified to also include
 this fix!

 After getting in rage about this for almost two days now i can confirm
 that django==2.0.1 will not install in python2 (with a recent pip version)
 - YAY
 BUT the original releases need to be updated, so that automated travis
 tests are not that complicated to setup and people can savely install the
 latest compatible django under python2.

-- 
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.22cfa8e382daa831f5f19f05eec28642%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29054: QuerySet with multiple annotations crashes with "unhashable type: 'Point'"

2018-01-25 Thread Django
#29054: QuerySet with multiple annotations crashes with "unhashable type: 
'Point'"
-+
 Reporter:  Lachlan Cannon   |Owner:  felixxm
 Type:  Bug  |   Status:  assigned
Component:  GIS  |  Version:  2.0
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+
Changes (by felixxm):

 * has_patch:  0 => 1


Comment:

 [https://github.com/django/django/pull/9620 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/065.c4b5074c598568aa66246009bc42b2f3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28668: Add ON CONFLICT support to QuerySet.bulk_create()

2018-01-25 Thread Django
#28668: Add ON CONFLICT support to QuerySet.bulk_create()
-+-
 Reporter:  Tom Forbes   |Owner:  Tom
 |  Forbes
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Дилян Палаузов):

 Let's start with the most complex case: calling
 {{{.objects.bulk_create(..., on_conflict='ignore')}}} where the caller
 wants to determine which of the supplied objects were actually inserted
 (in order to call signals on them).  We can start with the attached
 minimalistic patch, which does this for Postgresql as only RDBMS allowing
 efficient handling of this most complex case, and see how to implement it
 in the other RDBMs.

 Unfortunately, the sequence counter is automatically increased for each
 object provided as parameter, even if at the end the object was already in
 the database.

 I propose extending the logic for bulk_create to send implicit post_save
 signals for Postgresql.

-- 
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.8f705b44f0a7b0e8bcc505c0e2eeca43%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28668: Add ON CONFLICT support to QuerySet.bulk_create()

2018-01-25 Thread Django
#28668: Add ON CONFLICT support to QuerySet.bulk_create()
-+-
 Reporter:  Tom Forbes   |Owner:  Tom
 |  Forbes
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Дилян Палаузов):

 * Attachment "on_conflict_postgresql.patch" added.

 this adds INSERT ON CONFLICT IGNORE to Postgresql, where only IDs of the
 actually inserted rows are returned

-- 
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.ab1b15b298481c5b45068f5958c9f717%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #29066: Sum does not support __neg__

2018-01-25 Thread Django
#29066: Sum does not support __neg__
-+-
   Reporter:  Matthew|  Owner:  nobody
  Pava   |
   Type:  Bug| Status:  new
  Component:  Database   |Version:  master
  layer (models, ORM)|
   Severity:  Normal |   Keywords:
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 I am trying to negate the sum of values in my model, and the workaround is
 to multiply by `Value(-1)`.

 I get this error when I try to annotate by `-Sum('field')`:

 {{{
 TypeError
 bad operand type for unary -: 'Sum'
 }}}

-- 
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.c4006d9f1c5ddb8fc2d04b97335b753f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29059: ChoiceWidget.optgroups() doesn't group choices without a group together

2018-01-25 Thread Django
#29059: ChoiceWidget.optgroups() doesn't group choices without a group together
-+-
 Reporter:  Riccardo Di  |Owner:  Abhishek
  Virgilio   |  Gautam
 Type:  Bug  |   Status:  assigned
Component:  Forms|  Version:  2.0
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Abhishek Gautam):

 * owner:  nobody => Abhishek Gautam
 * 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/076.fc419ed02c465033c709f8a8c99491b1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29065: Only load Pillow if needed (was: Don't load Pillow unless needed)

2018-01-25 Thread Django
#29065: Only load Pillow if needed
-+-
 Reporter:  Collin Anderson  |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  File |  Version:  2.0
  uploads/storage|
 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 Collin Anderson):

 * cc: Collin Anderson (added)
 * has_patch:  0 => 1


Comment:

 https://github.com/django/django/pull/9619

-- 
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.91182e911132767bd709e5ed71c67001%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #29065: Don't load Pillow unless needed

2018-01-25 Thread Django
#29065: Don't load Pillow unless needed
+
   Reporter:  Collin Anderson   |  Owner:  nobody
   Type:  Uncategorized | Status:  new
  Component:  File uploads/storage  |Version:  2.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 |
+
 Before #21548, Pillow was only loaded if needed. It would be nice if this
 were still true.

-- 
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.774d173da21ccadb34d8923d6bb8e172%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29054: QuerySet with multiple annotations crashes with "unhashable type: 'Point'"

2018-01-25 Thread Django
#29054: QuerySet with multiple annotations crashes with "unhashable type: 
'Point'"
-+
 Reporter:  Lachlan Cannon   |Owner:  felixxm
 Type:  Bug  |   Status:  assigned
Component:  GIS  |  Version:  2.0
 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 felixxm):

 * owner:  nobody => felixxm
 * 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/065.9436cd29df88aa44a2537f9423f6b5fe%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29064: SuccessMessageMixin delete support

2018-01-25 Thread Django
#29064: SuccessMessageMixin delete support
-+-
 Reporter:  Éttore Leandro   |Owner:  nobody
  Tognoli|
 Type:  New feature  |   Status:  closed
Component:  contrib.messages |  Version:  2.0
 Severity:  Normal   |   Resolution:  duplicate
 Keywords:  delete, message, | Triage Stage:
  SuccessMessageMixin, DeleteView,   |  Unreviewed
  generic view   |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Simon Charette):

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


Comment:

 Duplicate of #21936.

-- 
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/078.6e3a8f65be40d7c9c48df2f2119ee75a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29060: Make {% firstof %} assign '' to the asvar if all inputs are false

2018-01-25 Thread Django
#29060: Make {% firstof %} assign '' to the asvar if all inputs are false
-+-
 Reporter:  Roger Gammans|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Template system  |  Version:  1.8
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham ):

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


Comment:

 In [changeset:"d0b44c44ef6ac8b6a7e332b83b9932f23dee41fd" d0b44c44]:
 {{{
 #!CommitTicketReference repository=""
 revision="d0b44c44ef6ac8b6a7e332b83b9932f23dee41fd"
 Fixed #29060 -- Made {% firstof %} assign '' to the asvar if all inputs
 are false.
 }}}

-- 
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.9f786b3f6f7973d523846a08178213f2%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28949: Multibyte table name or column name causes miscalculation of the length of index name.

2018-01-25 Thread Django
#28949: Multibyte table name or column name causes miscalculation of the length 
of
index name.
-+-
 Reporter:  Pak Youngrok |Owner:  Abhishek
 |  Gautam
 Type:  Bug  |   Status:  assigned
Component:  Migrations   |  Version:  2.0
 Severity:  Normal   |   Resolution:
 Keywords:  migration multibyte  | Triage Stage:  Accepted
  index  |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Abhishek Gautam):

 As we just need a unique name for an index can so, can we create
 index_name as :
 {{{#!python
 index_name = '%s%s' % (self._digest(*([table_name] + column_names)),
 suffix)
 }}}

 _digest function will be:

 {{{#!python
 @classmethod
 def _digest(cls, *args):
 """
 Generate a 32-bit digest of a set of arguments that can be used to
 shorten identifying names.
 """
 h = hashlib.md5()
 for arg in args:
 h.update(force_bytes(arg))
 return h.hexdigest()
 }}}

 Using _digest method we will get 32 byte string and in that we will add
 suffix which will give us a length of index_name = 32 + length of suffix.
 As suffix length will be very small length of index_name will not be able
 to exceed 40 also.

-- 
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.0fc4696c0c9a1878e505d9dcbad4ce19%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #29064: SuccessMessageMixin delete support

2018-01-25 Thread Django
#29064: SuccessMessageMixin delete support
-+-
   Reporter:  Éttore |  Owner:  nobody
  Leandro Tognoli|
   Type:  New| Status:  new
  feature|
  Component: |Version:  2.0
  contrib.messages   |   Keywords:  delete, message,
   Severity:  Normal |  SuccessMessageMixin, DeleteView,
   Triage Stage: |  generic view
  Unreviewed |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 I want to show a message when  I delete some object using the
 SuccessMessageMixin, but it doesn't work because the DeleteView doesn't
 have a form_valid method.
 I think it would be nice if django had native support for this.

 I wrote something like this in my personal project:

 {{{

 from django.contrib import messages
 from django.contrib.messages.views import SuccessMessageMixin
 from django.forms import model_to_dict

 class SuccessMessageMixinWithDeleteSupport(SuccessMessageMixin):
 def delete_form_valid(self, object):
 success_message = self.get_success_message(model_to_dict(object))
 if success_message:
 messages.success(self.request, success_message)

 def delete(self, *args, **kwargs):
 object = self.get_object()
 result = super().delete(*args, **kwargs)
 self.delete_form_valid(object)
 return result
 }}}

-- 
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/063.93b1167c31366f737e630c77293cbc2f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29060: Make {% firstof %} assign '' to the asvar if all inputs are false (was: FirstOf with an 'as' clause has confusing behaviour in all false case)

2018-01-25 Thread Django
#29060: Make {% firstof %} assign '' to the asvar if all inputs are false
-+-
 Reporter:  Roger Gammans|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Template system  |  Version:  1.8
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

 * stage:  Unreviewed => 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 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.dc17c0b03c3ed76ac20058e43afe48eb%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29057: contrib.postgres OID caching crashes when initializing a ConnectionHandler manually (was: unable to retrive connection from ConnectionHandler in django 2.0)

2018-01-25 Thread Django
#29057: contrib.postgres OID caching crashes when initializing a 
ConnectionHandler
manually
--+
 Reporter:  Riccardo Di Virgilio  |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  contrib.postgres  |  Version:  2.0
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Tim Graham):

 * type:  Bug => Cleanup/optimization
 * component:  Database layer (models, ORM) => contrib.postgres
 * stage:  Unreviewed => Accepted


Comment:

 While `ConnectionHandler` isn't a public API, I suppose we could change
 the implementation of 86a18dc46aae3a4a6410e3f3d864fa0ec4e5b2cd to reallow
 your use case. Would you like to provide 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 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/076.f836902f93ca73e1b6248e3a6088f6d8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29058: Adding 'null=True' to a PointField doesn't create working migration

2018-01-25 Thread Django
#29058: Adding 'null=True' to a PointField doesn't create working migration
-+-
 Reporter:  Yaman Ozakin |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  GIS  |  Version:  1.11
 Severity:  Normal   |   Resolution:
 Keywords:  geodjango,   | Triage Stage:  Accepted
  pointfield |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

 * component:  Migrations => GIS
 * 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/067.a214eb9abb771ae3408fb694bbbd2c6b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24686: Support for Moving a model between two Django apps

2018-01-25 Thread Django
#24686: Support for Moving a model between two Django apps
---+
 Reporter:  Alex Rothberg  |Owner:  nobody
 Type:  New feature|   Status:  new
Component:  Migrations |  Version:  master
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  1
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+

Comment (by Alexandru Mărășteanu):

 In the meantime, I've built a management command to do just that. You can
 find it at [https://github.com/alexei/django-move-model alexei/django-
 move-model]

 If someone cared to take a look and submit some feedback, I'd really
 appreciate it.

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To 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.18e559efaa6081b66c4056eb7ef7c633%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29059: ChoiceWidget.optgroups() doesn't group choices without a group together (was: Widget optgroup is not grouping choices with no group)

2018-01-25 Thread Django
#29059: ChoiceWidget.optgroups() doesn't group choices without a group together
--+
 Reporter:  Riccardo Di Virgilio  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  Forms |  Version:  2.0
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Tim Graham):

 * stage:  Unreviewed => Accepted


Comment:

 It might be fine -- can you offer 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 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/076.8b963d6ad62b829bc7225d1490c83034%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28889: Use JavaScript to prevent double submission of admin forms

2018-01-25 Thread Django
#28889: Use JavaScript to prevent double submission of admin forms
-+-
 Reporter:  Manuel Saelices  |Owner:  Karan
 Type:   |  Bedi
  Cleanup/optimization   |   Status:  assigned
Component:  contrib.admin|  Version:  1.11
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Karan Bedi):

 Hi Carlton,

 - I am unable to reproduce the behavior, probably because till now, I am
 serving on localhost.
 - In the article, there are different methods of implementing the same.
 One improvement can be changing the label of the submit button after a
 click.
 - From the point of usability, there is just a comment by someone, which
 also doesn't seem concrete.

 Please guide me on how to proceed further.

-- 
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.5ee440849109fa5572be8349bf1e5702%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28838: annotations + base_manager_name + instance.save() raises exception

2018-01-25 Thread Django
#28838: annotations + base_manager_name + instance.save() raises exception
-+-
 Reporter:  James Addison|Owner:
 |  shangdahao
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  1.11
  (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
-+-
Changes (by Tim Graham ):

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


Comment:

 In [changeset:"8dc675d90f14a84ef95f16c7cc8100d9a04459b3" 8dc675d]:
 {{{
 #!CommitTicketReference repository=""
 revision="8dc675d90f14a84ef95f16c7cc8100d9a04459b3"
 Fixed #28838 -- Fixed Model.save() crash if the base manager annotates
 with a related field.
 }}}

-- 
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.bd7e1e7e613e4e9c99d0ee75d57a5079%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #29063: Replacement Migrations not being executed because of unapplied migrations should raise a warning.

2018-01-25 Thread Django
#29063: Replacement Migrations not being executed because of unapplied 
migrations
should raise a warning.
+
   Reporter:  Julian Schneider  |  Owner:  nobody
   Type:  Cleanup/optimization  | Status:  new
  Component:  Migrations|Version:  1.9
   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 |
+
 In Line 205-208 in django/db/migrations/loader.py replacement migrations
 (created with squash) are checked if they can be applied. If any of the to
 be replaced migrations isn't already applied the replacement migration is
 not added to the nodes list.

 This leads to the fact that if some of the migrations are removed or not
 completely applied before the squash is added and there is a dependency on
 the replacement migration, the user gets a 'NodeNotFoundError' where the
 replacement migration that is not being applied because of line 206 is the
 missing one.

 This is very confusing to the user, raising a warning in line 208 would
 inform the user that the squashed migration can not be applied because not
 all the 'child' migrations are applied.

 Had to debug into that to figure that out.

-- 
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/058.888a0d0f84c2a197c67c6bc9bcb4dd19%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29062: Sqlite in memory database does not work for testing.

2018-01-25 Thread Django
#29062: Sqlite in memory database does not work for testing.
-+-
 Reporter:  Juozas Masiulis  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Testing framework|  Version:  2.0
 Severity:  Normal   |   Resolution:
 Keywords:  sqlite, testing, | Triage Stage:
  databases  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham):

 Please provide a sample project that reproduces the problem.

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To 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.47e63dc0eb645267b9e8cec249e55277%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #29062: Sqlite in memory database does not work for testing.

2018-01-25 Thread Django
#29062: Sqlite in memory database does not work for testing.
-+-
   Reporter:  Juozas |  Owner:  nobody
  Masiulis   |
   Type:  Bug| Status:  new
  Component:  Testing|Version:  2.0
  framework  |   Keywords:  sqlite, testing,
   Severity:  Normal |  databases
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 I am getting database table locked errors, when running tests which use
 sqlite in memory database.
 This issue was introduced with this commit:
 
https://github.com/django/django/commit/bece837829eafbc22f2598dadf82c9a8364b085a
 I know this because reversing this commit resolves the issue for me.
 If sqlite in memory testing is no longer supported, it should be mentioned
 in the documentation. If it is supported, there needs to be some parameter
 in the settings to use liveserver without multithreading. Or just make a
 new class liveservermultithreaded.

-- 
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.560350e70e0509776987ee9b14203a24%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28949: Multibyte table name or column name causes miscalculation of the length of index name.

2018-01-25 Thread Django
#28949: Multibyte table name or column name causes miscalculation of the length 
of
index name.
-+-
 Reporter:  Pak Youngrok |Owner:  Abhishek
 |  Gautam
 Type:  Bug  |   Status:  assigned
Component:  Migrations   |  Version:  2.0
 Severity:  Normal   |   Resolution:
 Keywords:  migration multibyte  | Triage Stage:  Accepted
  index  |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Abhishek Gautam):

 * owner:  nobody => Abhishek Gautam
 * 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/066.ac5c219bdaf1fdd103318b2501e5ee24%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23842: Transient failure of django.contrib.gis.tests.geoapp.tests.GeoQuerySetTest.test_make_line

2018-01-25 Thread Django
#23842: Transient failure of
django.contrib.gis.tests.geoapp.tests.GeoQuerySetTest.test_make_line
+--
 Reporter:  Simon Charette  |Owner:  nobody
 Type:  Bug |   Status:  closed
Component:  GIS |  Version:  master
 Severity:  Normal  |   Resolution:  worksforme
 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):

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


Comment:

 I haven't seen this failure recently.

-- 
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.9f57906d4faff897421f4a34600b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29061: manage.py makemessages throws syntax error due to incorrectly generated django.pot, again

2018-01-25 Thread Django
#29061: manage.py makemessages throws syntax error due to incorrectly generated
django.pot, again
-+-
 Reporter:  Kyan |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Core (Management |  Version:  2.0
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:  gettext, | Triage Stage:
  makemessages, Windows  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Kyan):

 * Attachment "201703271529397914076.png" added.

 first makemessages is for "\r" version, second makemessages is for "\n"
 version.

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To 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.c963e8eee1a625d2074863f9dfe92876%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #29061: manage.py makemessages throws syntax error due to incorrectly generated django.pot, again

2018-01-25 Thread Django
#29061: manage.py makemessages throws syntax error due to incorrectly generated
django.pot, again
-+-
   Reporter:  Kyan   |  Owner:  nobody
   Type:  Bug| Status:  new
  Component:  Core   |Version:  2.0
  (Management commands)  |   Keywords:  gettext,
   Severity:  Normal |  makemessages, Windows
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 https://code.djangoproject.com/ticket/28773

 I met the same problem, exactly like the ticket above.
 I am using Django 2.0.1 and after check the django codes, I confirm that
 fix is in my django. But that fix doesn't work for me.
 (Fix:
 
https://github.com/django/django/commit/4f5526e346861c0b2ffa2ea7229747c883e14432)

 I changed the file in django/core/management/commands/makemessages.py
 {{{
 # django/core/management/commands/makemessages.py, line 193
 with open(potfile, 'a', encoding='utf-8', newline='\n') as fp:
 }}}

 from newline="\n" to newline="\r" and it works.

-- 
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/050.71cc3700c260988feeec40c86aa99f07%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29060: FirstOf with an 'as' clause has confusing behaviour in all false case

2018-01-25 Thread Django
#29060: FirstOf with an 'as' clause  has confusing behaviour in all false case
-+--
 Reporter:  Roger Gammans|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Template system  |  Version:  1.8
 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
-+--
Description changed by Roger Gammans:

Old description:

> I have verified this in version 1.8 and 2.0.
>
> firstof with an 'as' clause doesn't set; or reset the target context
> variable if all parameters are false. I would expect the context variable
> to be set to None or the empty string to match the replacement mode
> behaviour of the tag.
>
> As per summary.; Will add reference to a PR with a fix in while.

New description:

 I have verified this in version 1.8 and 2.0.

 firstof with an 'as' clause doesn't set; or reset the target context
 variable if all parameters are false. I would expect the context variable
 to be set to None or the empty string to match the replacement mode
 behaviour of the tag.

 As per summary.; Will add reference to a PR 9618 (
 https://github.com/django/django/pull/9618 ) has a fix and example
 unittest

--

-- 
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.71691dcd54070d20fd1eaf4fcccf9cc2%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #29060: FirstOf with an 'as' clause has confusing behaviour in all false case

2018-01-25 Thread Django
#29060: FirstOf with an 'as' clause  has confusing behaviour in all false case
---+
   Reporter:  Roger Gammans|  Owner:  nobody
   Type:  Bug  | Status:  new
  Component:  Template system  |Version:  1.8
   Severity:  Normal   |   Keywords:
   Triage Stage:  Unreviewed   |  Has patch:  1
Needs documentation:  0|Needs tests:  0
Patch needs improvement:  0|  Easy pickings:  0
  UI/UX:  0|
---+
 I have verified this in version 1.8 and 2.0.

 firstof with an 'as' clause doesn't set; or reset the target context
 variable if all parameters are false. I would expect the context variable
 to be set to None or the empty string to match the replacement mode
 behaviour of the tag.

 As per summary.; Will add reference to a PR with a fix in while.

-- 
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/051.6d94df1069661620ef1233c73042d83f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29057: unable to retrive connection from ConnectionHandler in django 2.0

2018-01-25 Thread Django
#29057: unable to retrive connection from ConnectionHandler in django 2.0
-+-
 Reporter:  Riccardo Di  |Owner:  nobody
  Virgilio   |
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  2.0
  (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
-+-
Changes (by felixxm):

 * cc: felixxm (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/076.2fa089a3e4a59f11ad3b3240ceb06fcb%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #29059: Widget optgroup is not grouping choices with no group

2018-01-25 Thread Django
#29059: Widget optgroup is not grouping choices with no group
+
   Reporter:  Riccardo Di Virgilio  |  Owner:  nobody
   Type:  Bug   | Status:  new
  Component:  Forms |Version:  2.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 |
+
 I'm having problems writing template for custom controls (a bootstrap
 button bar) using optgroup.
 the problem is that optgroup is not grouping choices without groups, this
 makes very hard to create several button bars that grouped togheter:


 {{{
 from django.forms.widgets import ChoiceWidget

 w = ChoiceWidget(choices = [
 ("one", 1),
 ("two", 2), [
 "italian", (
 ("uno", 1),
 ("due", 2)
 )
 ]
 ])
 }}}

 now see how choices are grouped from optgroup:


 {{{
 import json

 print(json.dumps(w.optgroups("name", "one"), indent = 4))
 }}}


 {{{
 [
 [
 null,
 [
 {
 "name": "name",
 "value": "one",
 "label": 1,
 "selected": true,
 "index": "0",
 "attrs": {
 "checked": true
 },
 "type": null,
 "template_name": null
 }
 ],
 0
 ],
 [
 null,
 [
 {
 "name": "name",
 "value": "two",
 "label": 2,
 "selected": false,
 "index": "1",
 "attrs": {},
 "type": null,
 "template_name": null
 }
 ],
 1
 ],
 [
 "italian",
 [
 {
 "name": "name",
 "value": "uno",
 "label": 1,
 "selected": false,
 "index": "2_0",
 "attrs": {},
 "type": null,
 "template_name": null
 },
 {
 "name": "name",
 "value": "due",
 "label": 2,
 "selected": false,
 "index": "2_1",
 "attrs": {},
 "type": null,
 "template_name": null
 }
 ],
 2
 ]
 ]
 }}}

 this means that if choices are flats (no groups) you are getting a number
 of groups that is the same of the number of choices, and in order to fix
 this you need to use the grouping filters on the template in order to
 regroup choices.

 I think this is a bug, and flat choices should be grouped together as None
 by optgroup method

 thanks

-- 
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.33d626ba83e801dc77cf9f34ca391cf3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #29058: Adding 'null=True' to a PointField doesn't create working migration

2018-01-25 Thread Django
#29058: Adding 'null=True' to a PointField doesn't create working migration
-+-
   Reporter:  Yaman  |  Owner:  nobody
  Ozakin |
   Type:  Bug| Status:  new
  Component: |Version:  1.11
  Migrations |   Keywords:  geodjango,
   Severity:  Normal |  pointfield
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 before:

 {{{
 class House(models.Model):
   point = models.PointField()
 }}}

 after:

 {{{
 class House(models.Model):
   point = models.PointField(null=True)
 }}}

 migration:
 {{{
 class Migration(migrations.Migration):

 dependencies = [
 ('myapp', '0001_initial'),
 ]

 operations = [
 migrations.AlterField(
 model_name='house',
 name='point',
 field=django.contrib.gis.db.models.fields.PointField(null=True,
 srid=4326),
 ),
 ]
 }}}

 Traceback:

 {{{
 python manage.py migrate
 Operations to perform:
   Apply all migrations: admin, auth, contenttypes, myapp, sessions
 Running migrations:
   Applying myapp.0002_auto_20180125_1119...Traceback (most recent call
 last):
   File "manage.py", line 22, in 
 execute_from_command_line(sys.argv)
   File "/Users/Basia/yamyam/research/django/myenv/lib/python3.6/site-
 packages/django/core/management/__init__.py", line 364, in
 execute_from_command_line
 utility.execute()
   File "/Users/Basia/yamyam/research/django/myenv/lib/python3.6/site-
 packages/django/core/management/__init__.py", line 356, in execute
 self.fetch_command(subcommand).run_from_argv(self.argv)
   File "/Users/Basia/yamyam/research/django/myenv/lib/python3.6/site-
 packages/django/core/management/base.py", line 283, in run_from_argv
 self.execute(*args, **cmd_options)
   File "/Users/Basia/yamyam/research/django/myenv/lib/python3.6/site-
 packages/django/core/management/base.py", line 330, in execute
 output = self.handle(*args, **options)
   File "/Users/Basia/yamyam/research/django/myenv/lib/python3.6/site-
 packages/django/core/management/commands/migrate.py", line 204, in handle
 fake_initial=fake_initial,
   File "/Users/Basia/yamyam/research/django/myenv/lib/python3.6/site-
 packages/django/db/migrations/executor.py", line 115, in migrate
 state = self._migrate_all_forwards(state, plan, full_plan, fake=fake,
 fake_initial=fake_initial)
   File "/Users/Basia/yamyam/research/django/myenv/lib/python3.6/site-
 packages/django/db/migrations/executor.py", line 145, in
 _migrate_all_forwards
 state = self.apply_migration(state, migration, fake=fake,
 fake_initial=fake_initial)
   File "/Users/Basia/yamyam/research/django/myenv/lib/python3.6/site-
 packages/django/db/migrations/executor.py", line 244, in apply_migration
 state = migration.apply(state, schema_editor)
   File "/Users/Basia/yamyam/research/django/myenv/lib/python3.6/site-
 packages/django/db/migrations/migration.py", line 129, in apply
 operation.database_forwards(self.app_label, schema_editor, old_state,
 project_state)
   File "/Users/Basia/yamyam/research/django/myenv/lib/python3.6/site-
 packages/django/db/migrations/operations/fields.py", line 216, in
 database_forwards
 schema_editor.alter_field(from_model, from_field, to_field)
   File "/Users/Basia/yamyam/research/django/myenv/lib/python3.6/site-
 packages/django/db/backends/base/schema.py", line 494, in alter_field
 (old_field, new_field),
 ValueError: Cannot alter field myapp.House.point into myapp.House.point -
 they do not properly define db_type (are you using a badly-written custom
 field?)
 }}}

 Using Spatialite as backend engine.

-- 
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/052.ac65aba928b9eae934c58b7580eacde0%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29057: unable to retrive connection from ConnectionHandler in django 2.0

2018-01-25 Thread Django
#29057: unable to retrive connection from ConnectionHandler in django 2.0
-+-
 Reporter:  Riccardo Di  |Owner:  nobody
  Virgilio   |
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  2.0
  (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 Riccardo Di Virgilio):

 the problem is django.contrib.postgres.signals.
 there is a registred signal that is trying to read from connections and
 obviously it fails because "temp" is not registred


 {{{
 def get_hstore_oids(connection_alias):
 """Return hstore and hstore array OIDs."""
 with connections[connection_alias]
 }}}

-- 
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/076.5d8d0b725242b68b7e3520c4c7212f25%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #29057: unable to retrive connection from ConnectionHandler in django 2.0

2018-01-25 Thread Django
#29057: unable to retrive connection from ConnectionHandler in django 2.0
-+-
   Reporter:  Riccardo   |  Owner:  nobody
  Di Virgilio|
   Type:  Bug| Status:  new
  Component:  Database   |Version:  2.0
  layer (models, ORM)|
   Severity:  Normal |   Keywords:
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 please note that this works on django 1.10


 {{{
 c = ConnectionHandler( {'temp': {'NAME': 'template1', 'ENGINE':
 'django.db.backends.postgresql', 'USER': 'rdv', 'HOST': 'localhost',
 'PORT': '5432', 'PASSWORD': '', 'OPTIONS': {}, 'READONLY': False,
 'BACKUP': False, 'RESTORE': 'release', 'RESTORE_AUTO': True,
 'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0,
 'TIME_ZONE': None, 'TEST': {'CHARSET': None, 'COLLATION': None, 'NAME':
 None, 'MIRROR': None}}, 'default': {'NAME': 'rotostampa_db', 'ENGINE':
 'django.db.backends.postgresql', 'USER': 'rdv', 'HOST': 'localhost',
 'PORT': '5432', 'PASSWORD': '', 'OPTIONS': {}, 'READONLY': False,
 'BACKUP': False, 'RESTORE': 'release', 'RESTORE_AUTO': True,
 'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0,
 'TIME_ZONE': None, 'TEST': {'CHARSET': None, 'COLLATION': None, 'NAME':
 None, 'MIRROR': None}}})

 c['temp'].cursor()
 }}}


 {{{
  raise ConnectionDoesNotExist("The connection %s doesn't exist" % alias)
 django.db.utils.ConnectionDoesNotExist: The connection temp doesn't exist
 }}}

-- 
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.72f226ee4a564db6ea8b7929e34b7d46%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29056: Required SelectDateWidget renders invalid HTML

2018-01-25 Thread Django
#29056: Required SelectDateWidget renders invalid HTML
-+-
 Reporter:  Vlastimil Zíma   |Owner:  Stanislav
 |  Filin
 Type:  Bug  |   Status:  assigned
Component:  Forms|  Version:  master
 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 felixxm):

 * version:  2.0 => 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/063.85a435aa2bd210207b2b0572cea14140%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29056: Required SelectDateWidget renders invalid HTML

2018-01-25 Thread Django
#29056: Required SelectDateWidget renders invalid HTML
-+-
 Reporter:  Vlastimil Zíma   |Owner:  Stanislav
 |  Filin
 Type:  Bug  |   Status:  assigned
Component:  Forms|  Version:  master
 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 felixxm):

 * cc: felixxm (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/063.a0caa54036a493351ae12b2d84d4cf0a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29056: Required SelectDateWidget renders invalid HTML

2018-01-25 Thread Django
#29056: Required SelectDateWidget renders invalid HTML
-+-
 Reporter:  Vlastimil Zíma   |Owner:  Stanislav
 |  Filin
 Type:  Bug  |   Status:  assigned
Component:  Forms|  Version:  2.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 Stanislav Filin):

 * owner:  nobody => Stanislav Filin
 * status:  new => assigned


Comment:

 I can fix 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 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/063.d2e9ef11beaf5c86df6f1989a0413295%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #29056: Required SelectDateWidget renders invalid HTML

2018-01-25 Thread Django
#29056: Required SelectDateWidget renders invalid HTML
--+
   Reporter:  Vlastimil Zíma  |  Owner:  nobody
   Type:  Bug | Status:  new
  Component:  Forms   |Version:  2.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   |
--+
 `SelectDateWidget` in required field renders an invalid HTML. According to
 standard https://www.w3.org/TR/html5/sec-forms.html#placeholder-label-
 option every `select` with `required` attribute must have a placeholder
 option, i.e. first option must have an empty string as a value. That is
 not a case of `SelectDateWidget`.

 === Example ===
 {{{
 #!python
 from django import forms
 class FooForm(forms.Form):
 a_date = forms.DateField(widget=forms.SelectDateWidget)
 form = FooForm()
 str(form) # >>> ...January...
 }}}

-- 
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/048.247ecbf4cd7213028fffdb23f28625a3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27399: Segfault when running GDALBandTests on OSX 10.11.6

2018-01-25 Thread Django
#27399: Segfault when running GDALBandTests on OSX 10.11.6
--+
 Reporter:  Tatiana Vasilevskaya  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  GIS   |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by winsent):

 Look at this example. Install  only pillow and Django without GDAL python
 binding. This code raise exeption after pillow installed.

 {{{
 GEOTIF_PATH=/ta/dem.tif

 virtualenv --python=python3 test
 cd test
 source bin/activate
 pip install django==1.11.9 pillow
 python -c "from django.contrib.gis.gdal import GDALRaster;
 print(GDALRaster('$GEOTIF_PATH'))"
 django-admin startproject testtest
 cd testtest
 django-admin startapp testtesttest
 echo "\n\nINSTALLED_APPS += ['testtesttest']" >> testtest/settings.py
 mkdir -p testtesttest/management/commands
 touch testtesttest/management/__init__.py
 testtesttest/management/commands/__init__.py
 echo "from django.core.management.base import BaseCommand
 class Command(BaseCommand):
 def handle(self, *args, **options):
 from django.contrib.gis.gdal import GDALRaster
 print(GDALRaster('$GEOTIF_PATH'))
 " > testtesttest/management/commands/gdal_test.py
 python manage.py gdal_test
 pip uninstall -y pillow
 python manage.py gdal_test
 }}}

 Result:
 {{{
 TIFFReadDirectory: Warning, Unknown field with tag 42113 (0xa481)
 encountered.
 [1]53998 bus error  python manage.py gdal_test
 }}}

-- 
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.dbaad3e577c46ba7d421b0cf4bfda657%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.