[Django] #29258: Better error message for passing authentication backend class where string expected

2018-03-24 Thread Django
#29258: Better error message for passing authentication backend class where 
string
expected
-+
   Reporter:  Ryan Govostes  |  Owner:  nobody
   Type:  New feature| Status:  new
  Component:  contrib.auth   |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  |
-+
 I had written

 {{{
 from django.contrib.auth.backends import ModelBackend
 ...
 login(request, user, backend=ModelBackend)
 }}}

 which generated a very bizarre exception "Object of type 'type' is not
 JSON serializable" from the sessions middleware with no backtrace leading
 back to my code.

 In the documentation for "Selecting the authentication backend", it says:
 "the value of the backend argument or the user.backend attribute should be
 a dotted import path string (like that found in AUTHENTICATION_BACKENDS),
 not the actual backend class."

 It would be nice to catch this, e.g., `assert isinstance(backend, str)`
 closer to the site of the mistake.

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


Re: [Django] #29203: Cached Session may cause losing a session, when it failed to connect to cache backend

2018-03-24 Thread Django
#29203: Cached Session may cause losing a session, when it failed to connect to
cache backend
-+-
 Reporter:  Kenial Sookyum Lee   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  contrib.sessions |  Version:  1.11
 Severity:  Normal   |   Resolution:
 Keywords:  session cookie,  | Triage Stage:  Accepted
  cached session |
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:

 I'm not sure what to do, but your report seems credible.

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


Re: [Django] #29257: If creation of a db cursor fails, the resulting traceback is misleading

2018-03-24 Thread Django
#29257: If creation of a db cursor fails, the resulting traceback is misleading
-+-
 Reporter:  Jerome Leclanche |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  2.0
  (models, ORM)  |
 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 Tim Graham):

 * type:  Uncategorized => Bug
 * needs_tests:  0 => 1
 * stage:  Unreviewed => Accepted


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

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


[Django] #29257: If creation of a db cursor fails, the resulting traceback is misleading

2018-03-24 Thread Django
#29257: If creation of a db cursor fails, the resulting traceback is misleading
-+-
   Reporter:  Jerome |  Owner:  nobody
  Leclanche  |
   Type: | Status:  new
  Uncategorized  |
  Component:  Database   |Version:  2.0
  layer (models, ORM)|
   Severity:  Normal |   Keywords:
   Triage Stage: |  Has patch:  1
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 When a schema is out of sync (eg. running tests for a project where a
 model has fields not present in the migration).

 The creation of a cursor involves a sql query which includes all of the
 field names. Creating that cursor will fail.
 However, the exception is currently caught by a try/except which always
 attempts to *close* the cursor. Closing the cursor is not try/excepted,
 which results in that particular query failing and a traceback that looks
 like "ERROR:  cursor "_django_curs_140260213699904_6" does not exist".

 Patch:


 {{{

 commit 7c7a1f53acbf7d94f0a9b360f973711a7c9fbfbd (HEAD ->
 refs/heads/master)
 Author: Jerome Leclanche 
 Date:   Tue Mar 20 09:57:26 2018 +0200

 Raise outer exception when failing to close a cursor after an error

 diff --git a/django/db/models/sql/compiler.py
 b/django/db/models/sql/compiler.py
 index 1fdbd156b6..f96be3c4ea 100644
 --- a/django/db/models/sql/compiler.py
 +++ b/django/db/models/sql/compiler.py
 @@ -1051,10 +1051,15 @@ class SQLCompiler:
  cursor = self.connection.cursor()
  try:
  cursor.execute(sql, params)
 -except Exception:
 +except Exception as e:
  # Might fail for server-side cursors (e.g. connection closed)
 -cursor.close()
 -raise
 +try:
 +cursor.close()
 +except Exception:
 +# If we got an error creating the cursor, then closing it
 +# will always fail. Raise the outer exception instead of
 the
 +# obscure "cursor _django_curs_ does not exist".
 +raise e from None

  if result_type == CURSOR:
  # Give the caller the cursor to process and close.

 }}}

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


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

2018-03-24 Thread Django
#29202: KeyError in django-sites caching (race condition?)
+--
 Reporter:  Dominik George  |Owner:  nobody
 Type:  Bug |   Status:  closed
Component:  contrib.sites   |  Version:  1.10
 Severity:  Normal  |   Resolution:  needsinfo
 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 Tim Graham):

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


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


Re: [Django] #29241: ConditionalGetMiddleware and x-sendfile

2018-03-24 Thread Django
#29241: ConditionalGetMiddleware and x-sendfile
-+
 Reporter:  TZanke   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Core (Cache system)  |  Version:  1.11
 Severity:  Normal   |   Resolution:
 Keywords:  sendfile | 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


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


Re: [Django] #29243: Improve efficiency of migration graph algorithm (was: Migration graph code is inefficient)

2018-03-24 Thread Django
#29243: Improve efficiency of migration graph algorithm
--+
 Reporter:  Krzysztof Gogolewski  |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Migrations|  Version:  2.0
 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
 * stage:  Unreviewed => Accepted


Comment:

 Tentatively accepting for further evaluation of the patch. If the patch
 isn't viable, it might be useful to add a test to show why not, if
 possible.

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


Re: [Django] #29247: A custom blank value in model field choices doesn't work when using named groups (was: Choices ignoring the defined blank value)

2018-03-24 Thread Django
#29247: A custom blank value in model field choices doesn't work when using 
named
groups
-+-
 Reporter:  orlnub123|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  choices  | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

 * needs_better_patch:  0 => 1
 * stage:  Unreviewed => Accepted
 * component:  Forms => Database layer (models, ORM)


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


Re: [Django] #29249: Add option to dumpdata with unicode JSON

2018-03-24 Thread Django
#29249: Add option to dumpdata with unicode JSON
-+-
 Reporter:  hakib|Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Core (Management |  Version:  2.0
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:  dumpdata, unicode| Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

 * needs_better_patch:  0 => 1
 * has_patch:  0 => 1
 * stage:  Unreviewed => Accepted


Comment:

 Okay. My main concern is that an option calls `--allow_unicode` may
 suggest to readers that all serializers prohibit unicode by default. That
 may not be true. Your patch also needs documentation.

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

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


Re: [Django] #29249: Add option to dumpdata to allow unicode JSON or YAML (was: Add option to dumpdata with unicode JSON)

2018-03-24 Thread Django
#29249: Add option to dumpdata to allow unicode JSON or YAML
-+-
 Reporter:  hakib|Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Core (Management |  Version:  2.0
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:  dumpdata, unicode| Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  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/063.5cef2f436cc0c6e0e6c4b3af59615e13%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29255: bulk=False does not work with m2m relations

2018-03-24 Thread Django
#29255: bulk=False does not work with m2m relations
---+--
 Reporter:  Victor Porton  |Owner:  nobody
 Type:  Bug|   Status:  closed
Component:  Documentation  |  Version:  1.11
 Severity:  Normal |   Resolution:  fixed
 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 Tim Graham):

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


Comment:

 This was addressed a couple days ago in
 abe6c5defefc7057e7fb5f47b79643f7b89f7d90 (also backported to the Django
 2.0 docs). The Django 1.11 documentation is no longer updated.

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


Re: [Django] #29256: Need a save() call after assigning a many to many relation (was: Needs two save() calls)

2018-03-24 Thread Django
#29256: Need a save() call after assigning a many to many relation
-+-
 Reporter:  Victor Porton|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  1.11
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  invalid
 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 Tim Graham):

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


Comment:

 The blog post is incorrect. A second save isn't needed. Also, that code
 won't work in Django 2.0 and later which removed support for
 [https://docs.djangoproject.com/en/dev/releases/1.10/#direct-assignment-
 to-a-reverse-foreign-key-or-many-to-many-relation direct assignment to
 many to many relations].

 The blog post should use `foo.child.set(parts)` as described
 [https://docs.djangoproject.com/en/stable/topics/db/examples/many_to_many/
 in the documentation].

 In the future, please use [wiki:TicketClosingReasons/UseSupportChannels
 our support channels] to ask "is it a bug?" questions.

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


Re: [Django] #29256: Needs two save() calls

2018-03-24 Thread Django
#29256: Needs two save() calls
-+-
 Reporter:  Victor Porton|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.11
  (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 Victor Porton):

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


[Django] #29256: Needs two save() calls

2018-03-24 Thread Django
#29256: Needs two save() calls
-+-
   Reporter:  Victor |  Owner:  nobody
  Porton |
   Type:  Bug| Status:  new
  Component:  Database   |Version:  1.11
  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  |
-+-
 As http://guido.vonrudorff.de/django-manytomany-relationship-and-unsaved-
 objects/ teaches (and our tests show too), `save()` should be called twice
 when using m2m fields:

 {{{
 parts = BarClass.objects.filter(label__in=['eggs', 'bacon', 'spam'])
 foo = FooClass(label='lunch')
 foo.save() # do not forget this line
 foo.child = parts
 foo.save()
 }}}

 It looks silly and counter-intuitive to call `save()` twice. Is this a
 bug?

 At least the docs should say this vividly. So at very least we have a bug
 in documentation for not addressing this issue.

 The model code used:

 {{{
 class BarClass(models.Model):
 label = models.CharField()

 class FooClass(models.Model):
 label = models.CharField()
 child = models.ManyToManyField(BarClass)
 }}}

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


[Django] #29255: bulk=False does not work with m2m relations

2018-03-24 Thread Django
#29255: bulk=False does not work with m2m relations
-+
   Reporter:  Victor Porton  |  Owner:  nobody
   Type:  Bug| Status:  new
  Component:  Documentation  |Version:  1.11
   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  |
-+
 https://docs.djangoproject.com/en/1.11/ref/models/relations/ `add(*objs,
 bulk=False)` docs suggest that `bulk=False` can be used with both reverse
 foreign keys and with m2m relations.

 In fact in Django 1.11 this keyword argument does not work with m2m
 relations. So it is a bug either in Django or in the docs.

 I have not checked Django 2.

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


Re: [Django] #29254: Improve paginator count performance by removing select_related from the query

2018-03-24 Thread Django
#29254: Improve paginator count performance by removing select_related from the
query
-+-
 Reporter:  hakib|Owner:  nobody
 Type:   |   Status:  closed
  Cleanup/optimization   |
Component:  Core (Other) |  Version:  2.0
 Severity:  Normal   |   Resolution:  invalid
 Keywords:  pagination   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by hakib):

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


-- 
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.ebd78107d94db684dbc390e1ecf8686e%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-24 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 Rubén Gómez):

 I just made a PR to solve this problem:
 [https://github.com/django/django/pull/9820]

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


Re: [Django] #28554: Add support for multiple file fields

2018-03-24 Thread Django
#28554: Add support for multiple file fields
-+-
 Reporter:  Johannes Hoppe   |Owner:  Johannes
 |  Hoppe
 Type:  New feature  |   Status:  assigned
Component:  File |  Version:  master
  uploads/storage|
 Severity:  Normal   |   Resolution:
 Keywords:  file, storage,   | Triage Stage:  Accepted
  upload, multiple, input|
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Johannes Hoppe):

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


Re: [Django] #29253: method_decorator() with list argument doesn't copy over attributes of the decorator function

2018-03-24 Thread Django
#29253: method_decorator() with list argument doesn't copy over attributes of 
the
decorator function
+--
 Reporter:  Chris Jerdonek  |Owner:  Chris Jerdonek
 Type:  Bug |   Status:  assigned
Component:  Utilities   |  Version:  2.0
 Severity:  Normal  |   Resolution:
 Keywords:  decorators  | Triage Stage:  Accepted
Has patch:  1   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+--
Changes (by Chris Jerdonek):

 * has_patch:  0 => 1


Comment:

 I prepared a pull request here: https://github.com/django/django/pull/9819

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


Re: [Django] #29253: method_decorator() with list argument doesn't copy over attributes of the decorator function

2018-03-24 Thread Django
#29253: method_decorator() with list argument doesn't copy over attributes of 
the
decorator function
+--
 Reporter:  Chris Jerdonek  |Owner:  Chris Jerdonek
 Type:  Bug |   Status:  assigned
Component:  Utilities   |  Version:  2.0
 Severity:  Normal  |   Resolution:
 Keywords:  decorators  | Triage Stage:  Accepted
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+--
Changes (by Chris Jerdonek):

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


[Django] #29254: Improve paginator count performance by removing select_related from the query

2018-03-24 Thread Django
#29254: Improve paginator count performance by removing select_related from the
query
-+-
   Reporter:  hakib  |  Owner:  nobody
   Type: | Status:  new
  Cleanup/optimization   |
  Component:  Core   |Version:  2.0
  (Other)|
   Severity:  Normal |   Keywords:  pagination
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  1
  UI/UX:  0  |
-+-
 The default paginator is initiated with an `object_list` and uses `.count`
 or ` len` on it to get the total number of rows required to calculate the
 current page, next page etc...

 Most of the time the object_list will be a QuerySet. When this is the case
 we can get an easy performace boost by removing any select_related from
 the query. select_related are adding an outer join so it cannot effect the
 total number of rows in query set - **select_related is basically dead
 weight if you only want to count the rows**.

 `Paginator.count` is pretty simple:

 {{{
 def count(self):
 """
 Returns the total number of objects, across all pages.
 """
 try:
 return self.object_list.count()
 except (AttributeError, TypeError):
 # AttributeError if object_list has no count() method.
 # TypeError if object_list.count() requires arguments
 # (i.e. is of type list).
 return len(self.object_list)
 }}}


 By changing to this:

 {{{
 return self.object_list.select_related(None).count()
 }}}

 **we can significantly improve the performace of the count when the
 original query has many select_related models** (as often seen in admin
 pages with admin_select_related and views that show tables of data).

 Only reservation I have is that `Paginator` is currently designed to
 support any kind of object that implements either `*.count` or `len(*)` -
 the tests also include some tests for random objects that implement count.
 This can easily be solved using `isinstance(object_list,  QuerySet)`,
 sniffing for `hasatrr(select_related, object_list)` or similar to how it's
 implemented today using `AttributeError`.

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