[Django] #29232: Add title option for admin filter when providing a field name

2018-03-16 Thread Django
#29232: Add title option for admin filter when providing a field name
-+
   Reporter:  David Sanders  |  Owner:  nobody
   Type:  New feature| Status:  new
  Component:  contrib.admin  |Version:  master
   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  |
-+
 The generated title for admin filters when the field is on a related model
 is often times confusing and not usable since it will be the name of the
 field without any reference to the fact that it's on a related model
 instead of the main model. When the field has the same name as a field on
 the main model it appears as a duplicate as far as the user can tell.

 This patch expands the existing tuple pattern for a `list_filter` item to
 allow the second parameter to be a string which will be used as the title,
 instead of only allowing a class inheriting from `FieldListFilter`. This
 dove-tails nicely with the existing functionality as providing a subclass
 of `FieldListFilter` allows you to easily provide a title on the class
 itself, but the ability to provide just a string to use as a title removes
 the need to subclass the correct class choice for the field type (which is
 fragile) and streamlines the process for when you only want to change the
 title.

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


Re: [Django] #29231: Documentation Regression for Tutorial 03

2018-03-16 Thread Django
#29231: Documentation Regression for Tutorial 03
---+--
 Reporter:  Paul   |Owner:  nobody
 Type:  Bug|   Status:  closed
Component:  Documentation  |  Version:  2.0
 Severity:  Normal |   Resolution:  fixed
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  1  |UI/UX:  0
---+--
Changes (by Paul):

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


Comment:

 Not sure what's going on, but it's working now following the existing
 tutorial steps.

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


Re: [Django] #29148: Explain how to use QuerySet.get_or_create() with Q objects

2018-03-16 Thread Django
#29148: Explain how to use QuerySet.get_or_create() with Q objects
---+---
 Reporter:  Mike Lissner   |Owner:  Dhruv Singh
 Type:  New feature|   Status:  assigned
Component:  Documentation  |  Version:  2.0
 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
---+---
Changes (by Tim Graham):

 * needs_better_patch:  0 => 1


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

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


Re: [Django] #29231: Documentation Regression for Tutorial 03

2018-03-16 Thread Django
#29231: Documentation Regression for Tutorial 03
---+--
 Reporter:  Paul   |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  Documentation  |  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:  1  |UI/UX:  0
---+--

Comment (by Paul):

 I have created a repo: [[https://github.com/leftcoastbeard/djangotest]]

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


Re: [Django] #29231: Documentation Regression for Tutorial 03

2018-03-16 Thread Django
#29231: Documentation Regression for Tutorial 03
---+--
 Reporter:  Paul   |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  Documentation  |  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:  1  |UI/UX:  0
---+--

Comment (by Paul):

 Running in virtualenv, pip list -l:
 arrow (0.12.1)
 blessed (1.14.2)
 Django (2.0.3)
 django-picklefield (1.0.0)
 django-q (0.9.4)
 pip (9.0.1)
 python-dateutil (2.7.0)
 pytz (2018.3)
 setuptools (38.5.2)
 six (1.11.0)
 uWSGI (2.0.17)
 wcwidth (0.1.7)
 wheel (0.30.0)

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


Re: [Django] #29231: Documentation Regression for Tutorial 03

2018-03-16 Thread Django
#29231: Documentation Regression for Tutorial 03
---+--
 Reporter:  Paul   |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  Documentation  |  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:  1  |UI/UX:  0
---+--
Changes (by Paul):

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


Comment:

 Here is my polls/url.py:
 {{{
 from django.urls import path

 from . import views

 app_name = 'polls'
 urlpatterns = [
 # /polls/
 path('',views.index, name='index'),
 # /polls/5/
 path('/', views.detail, name='detail'),
 # /polls/5/results/
 path('/results/', views.results, name='results'),
 # /polls/5/vote/
 path('/vote/', views.vote, name='vote'),
 ]
 }}}

 And python -m django --version yields 2.0.3

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


Re: [Django] #29229: QuerySet.values_list() combined with .extra() or .annotate() may produce wrong .union()

2018-03-16 Thread Django
#29229: QuerySet.values_list() combined with .extra() or .annotate() may produce
wrong .union()
-+-
 Reporter:  master   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Release blocker  |   Resolution:
 Keywords:  union values_list| Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by Dimas Ari):

 * Attachment "regression_test_29229.txt" added.

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


Re: [Django] #29231: Documentation Regression for Tutorial 03

2018-03-16 Thread Django
#29231: Documentation Regression for Tutorial 03
---+--
 Reporter:  Paul   |Owner:  nobody
 Type:  Bug|   Status:  closed
Component:  Documentation  |  Version:  2.0
 Severity:  Normal |   Resolution:  invalid
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  1  |UI/UX:  0
---+--
Changes (by Tim Graham):

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


Comment:

 This suggestion is incorrect. You may be missing `app_name = 'polls'` in
 `polls/urls.py`.

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


Re: [Django] #29097: Migrations using MySQL fail for constraints using composite indexes

2018-03-16 Thread Django
#29097: Migrations using MySQL fail for constraints using composite indexes
-+-
 Reporter:  geertjanvdk  |Owner:  (none)
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.11
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  introspection mysql  | Triage Stage:  Accepted
  migration index constraint |
Has patch:  1|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Basu Dubey):

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


-- 
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.959d916ffc476a4837bf159277182a14%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-03-16 Thread Django
#29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use
to_field
---+--
 Reporter:  Jonathan Nye   |Owner:  Basu Dubey
 Type:  Bug|   Status:  assigned
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 Basu Dubey):

 * status:  new => assigned
 * owner:  nobody => Basu Dubey


Comment:

 I wish to take this up.

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

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


[Django] #29231: Documentation Regression for Tutorial 03

2018-03-16 Thread Django
#29231: Documentation Regression for Tutorial 03
-+
   Reporter:  Paul   |  Owner:  nobody
   Type:  Bug| Status:  new
  Component:  Documentation  |Version:  2.0
   Severity:  Normal |   Keywords:
   Triage Stage:  Unreviewed |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  1
  UI/UX:  0  |
-+
 It looks like this issue may have been fixed in the past, but
 documentation version 1.7 onward do not mention this. It is also not
 mentioned in Tutorial 04.
 The tutorial is missing a reference to adding the namespace to the
 mysite/urls.py as follows:
 {{{
 from django.contrib import admin
 from django.urls import path, include

  urlpatterns = [
 -path('polls/', include('polls.urls')),
 +path('polls/', include('polls.urls', namespace="polls")),
  path('admin/', admin.site.urls),
  ]
 }}}

 Without this change, it gives an NoReverseMatch error, "polls" is not a
 registered namespace

 Could the tutorial be updated to include this change?
 [[https://docs.djangoproject.com/en/2.0/intro/tutorial03/#namespacing-url-
 names]]

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


Re: [Django] #29230: Incorrect behavior of QuerySet.prefetch_related() in some circumstances during multilevel data prefetching

2018-03-16 Thread Django
#29230: Incorrect behavior of QuerySet.prefetch_related() in some circumstances
during multilevel data prefetching
-+-
 Reporter:  Alex Sichkar |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.11
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  prefetch_related | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Alex Sichkar):

 * Attachment "prefetch_related_issue.zip" 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.0a212df41011c964943f68014c2210e9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #29230: Incorrect behavior of QuerySet.prefetch_related() in some circumstances during multilevel data prefetching

2018-03-16 Thread Django
#29230: Incorrect behavior of QuerySet.prefetch_related() in some circumstances
during multilevel data prefetching
-+-
   Reporter:  Alex   |  Owner:  nobody
  Sichkar|
   Type:  Bug| Status:  new
  Component:  Database   |Version:  1.11
  layer (models, ORM)|
   Severity:  Normal |   Keywords:  prefetch_related
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 In some circumstances prefetched data might be overwritten.

 IMHO this ticket is related to the issue:
 https://code.djangoproject.com/ticket/24873

 If I revert changes from this pull request:
 https://github.com/django/django/pull/4723
 there is no such problem.

 Prepared sample project with test case to reproduce the 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/049.db8086bc11efd3e53a9961a1bbd9ee7e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #29229: QuerySet.values_list() combined with .extra() or .annotate() may produce wrong .union()

2018-03-16 Thread Django
#29229: QuerySet.values_list() combined with .extra() or .annotate() may produce
wrong .union()
-+-
   Reporter:  master |  Owner:  nobody
   Type:  Bug| Status:  new
  Component:  Database   |Version:  master
  layer (models, ORM)|
   Severity:  Release|   Keywords:  union values_list
  blocker|
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  1
  UI/UX:  0  |
-+-
 Regression introduced in 2.0, still present in 2.0.3.

 Easy context to reproduce the problem: suppose a Message model, in a
 postman app. Only one ordinary field is enough for the demo.

 {{{#!python
 qs1 = Message.objects.extra(select={'count': 0}).values_list('id',
 'count').order_by()
 print(qs1.query)  # as expected:
 # SELECT (0) AS "count", "postman_message"."id"
 # FROM "postman_message"

 qs2 =
 
Message.objects.values('somefield').annotate(count=models.Count('pk')).annotate(id=models.Max('pk')).values_list('id',
 'count').order_by()
 print(qs2.query)  # as expected:
 # SELECT COUNT("postman_message"."id") AS "count",
 MAX("postman_message"."id") AS "id"
 # FROM "postman_message" GROUP BY "postman_message"."somefield"

 print(qs1.union(qs2).query)  # !! WRONG !! the qs2 part is truncated:
 # SELECT (0) AS "count", "postman_message"."id" FROM "postman_message"
 # UNION
 # SELECT MAX("postman_message"."id") AS "id" FROM "postman_message" GROUP
 BY "postman_message"."somefield"
 }}}

 Compared to version 1.11, it comes from this addition in
 db/models/sql/compiler.py/get_combinator_sql():
 {{{#!python
 if not compiler.query.values_select and self.query.values_select:
 compiler.query.set_values(self.query.values_select)
 }}}
 Here, self.query.values_select is ('id',).
 For qs2, values_select is indeed empty, as coded in
 db/models/sql/query.py/set_values(),
 because in this case the two values_list() arguments are managed in
 annotation_names[].

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


Re: [Django] #23130: BooleanField should not override 'blank' if choices are specified

2018-03-16 Thread Django
#23130: BooleanField should not override 'blank' if choices are specified
-+-
 Reporter:  Jonas H. |Owner:  (none)
 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 Tim Graham):

 * status:  assigned => new
 * owner:  Lynn Cyrin => (none)


Comment:

 I created #29227 for the issue of allowing `BooleanField` to be
 `null=True`. The PR there is ready for review. I'll leave this ticket open
 as I'm not sure if there's additional work to be done to resolve it. Even
 if no further code changes are required, a test for this use case might be
 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.13e9cf9f8b818c03dc4c0fbf126e1531%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29227: Allow BooleanField to be null=True

2018-03-16 Thread Django
#29227: Allow BooleanField to be null=True
-+-
 Reporter:  Tim Graham   |Owner:  Tim
 Type:   |  Graham
  Cleanup/optimization   |   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 Tim Graham):

 * has_patch:  0 => 1


Comment:

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


Re: [Django] #29228: Django query documentation does not talk about collation

2018-03-16 Thread Django
#29228: Django query documentation does not talk about collation
-+-
 Reporter:  Pierre Thibault  |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Documentation|  Version:  2.0
 Severity:  Normal   |   Resolution:
 Keywords:  collation sql query  | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham):

 Are you [https://docs.djangoproject.com/en/stable/ref/databases
 /#collation-settings using MySQL]?

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


[Django] #29228: Django query documentation does not talk about collation

2018-03-16 Thread Django
#29228: Django query documentation does not talk about collation
-+-
   Reporter:  Pierre |  Owner:  nobody
  Thibault   |
   Type:  New| Status:  new
  feature|
  Component: |Version:  2.0
  Documentation  |
   Severity:  Normal |   Keywords:  collation sql query
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 In Django documentation named
 [https://docs.djangoproject.com/en/2.0/ref/models/querysets/#std
 :fieldlookup-iexact Making queries], it does not talk about collation.
 What does it mean to be case insensitive with languages with accented
 characters? I think this deserves precision.

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


[Django] #29227: Allow BooleanField to be null=True

2018-03-16 Thread Django
#29227: Allow BooleanField to be null=True
-+-
   Reporter:  Tim|  Owner:  Tim Graham
  Graham |
   Type: | Status:  assigned
  Cleanup/optimization   |
  Component:  Database   |Version:  master
  layer (models, ORM)|
   Severity:  Normal |   Keywords:
   Triage Stage:  Accepted   |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 This will remove the wart of `NullBooleanField` and help solve other
 issues like #23130.

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


Re: [Django] #29226: @modify_settings append/remove/prepend is affected by dictionary order

2018-03-16 Thread Django
#29226: @modify_settings append/remove/prepend is affected by dictionary order
-+-
 Reporter:  Manuel Kaufmann  |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Testing framework|  Version:  2.0
 Severity:  Normal   |   Resolution:
 Keywords:  tests,   | Triage Stage:
  modify_settings|  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Manuel Kaufmann):

 * Attachment "test_modify_settings.patch" added.

 Tests to demostrate the inconsisten behaviour of @modify_settings

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


[Django] #29226: @modify_settings append/remove/prepend is affected by dictionary order

2018-03-16 Thread Django
#29226: @modify_settings append/remove/prepend is affected by dictionary order
-+-
   Reporter:  Manuel |  Owner:  nobody
  Kaufmann   |
   Type: | Status:  new
  Uncategorized  |
  Component:  Testing|Version:  2.0
  framework  |   Keywords:  tests,
   Severity:  Normal |  modify_settings
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 I found a weird behaviour when using `@modify_settings` with `append` and
 `remove` at the same time for the same elements. I used this because I
 needed to modify the order of the MIDDLEWARES classes: inject a middleware
 before one that it's already defined in that seeing. To do that, it's
 needed to remove all the middleware after that one (including it) and the
 re-add them by prepending your own.

 Example:


 {{{
 # Original settings
 MIDDLEWARES = [
 '1',
 '2',
 '3',
 '4',
 '5',
 ]
 }}}

 and I need this:

 {{{
 # Expected settings
 MIDDLEWARES = [
 '1',
 '2',
 '3',
 'MyOwnMiddlewareHere',
 '4',
 '5',
 ]
 }}}

 I would use `@modify_settings` in this way:

 {{{
 @modify_settings(MIDDLEWARES={
 'append': [
 'MyOwnMiddlewareHere',
 '4',
 '5',
 ],
 'remove': [
 '4',
 '5',
 ],
 })
 class FooBarTest(TestCase):
 
 }}}

 This cause different behaviours depending on the Python version we are
 using:

 * Python < 3.6 this will randmly works since it could
- first remove and then append the items: this will produce the
 expected result
- first append and then remove the items: this won't produce the
 expected result
 * Python >= 3.6 this will always produce the enexpected result because 3.6
 has "insertion ordering" and append will be applied first all the times
- we can change this behaviour in 3.6 by putting the remove key first,
 and it will always produce the expected result.

 NOTE: other Python implementation (not CPython) will also experiment this
 problem depending on their implementation.

 I fixed this in my own code by using `collections.OrderedDict` but I think
 this should be at least mentioned in the documentation to avoid other
 people having this issue. Otherwise, it could require an OrderedDict.

 I wrote some tests that I'm attaching the patch with some comments and
 explanations on why this is happening. I'm running the tests like this:
 `tox -e py35,py36 -- tests.settings_tests.tests`

 NOTE: this affects multiple versions of Django

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


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

2018-03-16 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_ignore.patch" added.

 The on_conflict_ignore.patch adds on_conflict='ignore' to
 QuerySet.bulk_create and empowers bulk_create optionally to send post_save
 signals, when the ID of the inserted object is known to bulk_create. For
 postgresql bulk_create offers in addition to retrieve the IDs of the newly
 inserted objects, when using on_conflict='ignore' and, with a second
 query, to find the PKs pf the supplied objs that were already in the
 databse. When supported by the backend (so not Oracle),
 on_conflict='ignore' is added to bulk_create() in
 
django.db.models.fields.create_forward_many_to_many_manager.ManyRelatedManager._add_items,
 making ManyRelatedManager.add() thread-safe, possibly resolving #19544.

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


Re: [Django] #28754: validate_ipv46_address validator allows IP addresses to begin with a first octet of zero

2018-03-16 Thread Django
#28754: validate_ipv46_address validator allows IP addresses to begin with a 
first
octet of zero
-+-
 Reporter:  frankston|Owner:  (none)
 Type:  Bug  |   Status:  new
Component:  Core (Other) |  Version:  1.11
 Severity:  Normal   |   Resolution:
 Keywords:  IP, regular  | Triage Stage:
  expression |  Someday/Maybe
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

 * status:  assigned => new
 * owner:  Tim G. => (none)
 * easy:  1 => 0


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


Re: [Django] #28462: ModelAdmin.list_editable unusably slow and memory intensive with large datasets

2018-03-16 Thread Django
#28462: ModelAdmin.list_editable unusably slow and memory intensive with large
datasets
---+
 Reporter:  Ben Cole   |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  contrib.admin  |  Version:  1.10
 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
---+
Changes (by Pablo Martín):

 * Attachment "memory-problem.png" added.


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

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


Re: [Django] #28462: ModelAdmin.list_editable unusably slow and memory intensive with large datasets

2018-03-16 Thread Django
#28462: ModelAdmin.list_editable unusably slow and memory intensive with large
datasets
---+
 Reporter:  Ben Cole   |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  contrib.admin  |  Version:  1.10
 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 Pablo Martín):

 +1 Same error. We have overwritten the ModelAdmin for this problem. I
 think solve a strange problem and getting a memory problem is not a good
 solution. I prefer a 500 error one time every three month that a serious
 memory problem every day.

 This commit
 
https://github.com/django/django/commit/917cc288a38f3c114a5440f0749b7e5e1086eb36#commitcomment-23412084
 does not make any sense.

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


Re: [Django] #29202: KeyError in django-sites caching (race condition?)

2018-03-16 Thread Django
#29202: KeyError in django-sites caching (race condition?)
+--
 Reporter:  Dominik George  |Owner:  nobody
 Type:  Bug |   Status:  new
Component:  contrib.sites   |  Version:  1.10
 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 Dominik George):

 Yeah. I am not saying the CMS isn't part of the problem, but I don't need
 a backtrace to tell that the code in Django is neither thread-safe nor
 otherwise good practice ☺.

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