Re: [Django] #30695: Fix an example of Storage objects in Managing files docs.

2019-08-12 Thread Django
#30695: Fix an example of Storage objects in Managing files docs.
-+-
 Reporter:  Tobias McNulty   |Owner:  Harrison
 Type:   |  Morgan
  Cleanup/optimization   |   Status:  assigned
Component:  Documentation|  Version:  2.2
 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 Harrison Morgan):

 * has_patch:  0 => 1


Comment:

 Pull Request: https://github.com/django/django/pull/11664

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

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


Re: [Django] #30695: Fix an example of Storage objects in Managing files docs.

2019-08-12 Thread Django
#30695: Fix an example of Storage objects in Managing files docs.
-+-
 Reporter:  Tobias McNulty   |Owner:  Harrison
 Type:   |  Morgan
  Cleanup/optimization   |   Status:  assigned
Component:  Documentation|  Version:  2.2
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by Harrison Morgan):

 * status:  new => assigned
 * cc: Harrison Morgan (added)
 * owner:  nobody => Harrison Morgan


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

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


Re: [Django] #29043: test --keepdb says "Using existing test database" even if it's run for the first time

2019-08-12 Thread Django
#29043: test --keepdb says "Using existing test database" even if it's run for 
the
first time
-+-
 Reporter:  karyon   |Owner:  Hasan
 Type:   |  Ramezani
  Cleanup/optimization   |   Status:  assigned
Component:  Database layer   |  Version:  2.0
  (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 Hasan Ramezani):

 * 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.e82b8c729942edd3b6dffe786470e1c3%40djangoproject.com.


Re: [Django] #30702: Form leaks all objects of model

2019-08-12 Thread Django
#30702: Form leaks all objects of model
-+-
 Reporter:  Kevin Olbrich|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Forms|  Version:  2.2
 Severity:  Normal   |   Resolution:  invalid
 Keywords:  form, forms, | Triage Stage:
  queryset   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Kevin Olbrich):

 Sure, np.

 Project:
 https://bitbucket.org/code-orange/django-playground-project
 (recursive clone!)

 Steps to reproduce:
 0. Clone, pip, migrate, etc.
 1. Create user (initial superadmin is sufficient)
 2. Create customer #1 "Allowed Customer Example"
 3. Create customer #2 "Super Secret Customer"
 4. Add user + "Allowed Customer Example" relation in multitenancy table
 5. Access website under /playground/forms/register
 6. Enter a domain and choose customer (only "Allowed Customer Example"
 will be visible)
 7. Submit form
 8. Error will be displayed, Customer only shows "Super Secret Customer"
 ("Allowed Customer Example" missing!).

 I can confirm this for SQLite and MySQL.

 The user should never be able to see other customers, as the filter is
 "MdatCustomers.objects.filter(mdatmultitenancyusers__user=self.user)".

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

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


Re: [Django] #30704: JSONField nested key and index transforms crash.

2019-08-12 Thread Django
#30704: JSONField nested key and index transforms crash.
--+
 Reporter:  felixxm   |Owner:  felixxm
 Type:  Bug   |   Status:  assigned
Component:  contrib.postgres  |  Version:  master
 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 felixxm):

 [https://github.com/django/django/pull/11662 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.57b2e3a425a68f84723c95a5858274a1%40djangoproject.com.


Re: [Django] #30672: JSONField/HStoreField key and index transforms crash.

2019-08-12 Thread Django
#30672: JSONField/HStoreField key and index transforms crash.
--+
 Reporter:  felixxm   |Owner:  felixxm
 Type:  Bug   |   Status:  assigned
Component:  contrib.postgres  |  Version:  1.11
 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 felixxm):

 I moved an issue with nested transforms to a separate ticket #30704
 because it is not a regression.

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

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


[Django] #30704: JSONField nested key and index transforms crash.

2019-08-12 Thread Django
#30704: JSONField nested key and index transforms crash.
+--
   Reporter:  felixxm   |  Owner:  felixxm
   Type:  Bug   | Status:  assigned
  Component:  contrib.postgres  |Version:  master
   Severity:  Normal|   Keywords:
   Triage Stage:  Accepted  |  Has patch:  1
Needs documentation:  0 |Needs tests:  0
Patch needs improvement:  0 |  Easy pickings:  0
  UI/UX:  0 |
+--
 JSONField/HStoreField nested keys and indexes transforms crash when we
 pass expressions with parameters, e.g.
 {{{
 JSONModel.objects.annotate(
 key=KeyTransform('d', 'field'),
 expr=KeyTransform('f', KeyTransform('1', Cast('key', JSONField(,
 )
 }}}

 Separated from #30672 because it is not a regression.

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

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


Re: [Django] #30672: JSONField/HStoreField key and index transforms crash.

2019-08-12 Thread Django
#30672: JSONField/HStoreField key and index transforms crash.
--+
 Reporter:  felixxm   |Owner:  felixxm
 Type:  Bug   |   Status:  assigned
Component:  contrib.postgres  |  Version:  1.11
 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):

 * severity:  Normal => Release blocker


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

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


Re: [Django] #30694: Document FileResponse does not seek its file source

2019-08-12 Thread Django
#30694: Document FileResponse does not seek its file source
---+
 Reporter:  Claude Paroz   |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  Documentation  |  Version:  2.2
 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 Carlton Gibson):

 * status:  closed => new
 * resolution:  wontfix =>
 * stage:  Unreviewed => Accepted


Comment:

 Yep, I'll take that. Perfect. 

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

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


Re: [Django] #30449: Ordering problem in admin.RelatedFieldListFilter and admin.RelatedOnlyFieldListFilter

2019-08-12 Thread Django
#30449: Ordering problem in admin.RelatedFieldListFilter and
admin.RelatedOnlyFieldListFilter
-+-
 Reporter:  Moritz Pfeiffer  |Owner:  zeynel
 Type:  Bug  |   Status:  assigned
Component:  contrib.admin|  Version:  master
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
  RelatedFieldListFilter,|
  RelatedOnlyFieldListFilter,|
  ordering   |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+-

Comment (by felixxm):

 Alternate [https://github.com/django/django/pull/11661 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/073.a9718fd1fb1a7787d37d17255de875db%40djangoproject.com.


Re: [Django] #30449: Ordering problem in admin.RelatedFieldListFilter and admin.RelatedOnlyFieldListFilter

2019-08-12 Thread Django
#30449: Ordering problem in admin.RelatedFieldListFilter and
admin.RelatedOnlyFieldListFilter
-+-
 Reporter:  Moritz Pfeiffer  |Owner:  zeynel
 Type:  Bug  |   Status:  assigned
Component:  contrib.admin|  Version:  master
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
  RelatedFieldListFilter,|
  RelatedOnlyFieldListFilter,|
  ordering   |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+-
Changes (by felixxm):

 * severity:  Normal => Release blocker


Comment:

 I closed #30703 as a duplicate. It is a regression introduced in #29835.

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

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


Re: [Django] #30703: Make RelatedFieldListFilter respect model meta ordering.

2019-08-12 Thread Django
#30703: Make RelatedFieldListFilter respect model meta ordering.
---+--
 Reporter:  Perlence   |Owner:  nobody
 Type:  Bug|   Status:  closed
Component:  contrib.admin  |  Version:  2.2
 Severity:  Normal |   Resolution:  duplicate
 Keywords:  filter | Triage Stage:  Unreviewed
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by felixxm):

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


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

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


Re: [Django] #30703: Make RelatedFieldListFilter respect model meta ordering. (was: Make RelatedFieldListFilter respect model meta ordering)

2019-08-12 Thread Django
#30703: Make RelatedFieldListFilter respect model meta ordering.
---+--
 Reporter:  Perlence   |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  contrib.admin  |  Version:  2.2
 Severity:  Normal |   Resolution:
 Keywords:  filter | Triage Stage:  Unreviewed
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by felixxm):

 Thanks for the report, it's a duplicate of #30449. I bumped it to a
 release blocker.

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

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


Re: [Django] #30702: Form leaks all objects of model

2019-08-12 Thread Django
#30702: Form leaks all objects of model
-+-
 Reporter:  Kevin Olbrich|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Forms|  Version:  2.2
 Severity:  Normal   |   Resolution:  invalid
 Keywords:  form, forms, | Triage Stage:
  queryset   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Claude Paroz):

 Sorry, but for us this code is not sufficient. Maybe upload a sample
 project?

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

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


Re: [Django] #30703: Make RelatedFieldListFilter respect model meta ordering

2019-08-12 Thread Django
#30703: Make RelatedFieldListFilter respect model meta ordering
---+--
 Reporter:  Perlence   |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  contrib.admin  |  Version:  2.2
 Severity:  Normal |   Resolution:
 Keywords:  filter | Triage Stage:  Unreviewed
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by Perlence):

 [https://github.com/django/django/pull/11661 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.c66e3da6418eb905efee79e7f867fc09%40djangoproject.com.


Re: [Django] #30702: Form leaks all objects of model

2019-08-12 Thread Django
#30702: Form leaks all objects of model
-+-
 Reporter:  Kevin Olbrich|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Forms|  Version:  2.2
 Severity:  Normal   |   Resolution:  invalid
 Keywords:  form, forms, | Triage Stage:
  queryset   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Kevin Olbrich):

 I've attached some demo code in my initial description. That code is
 enough to reproduce the issue.
 I was unable to spot where in the code it decides to drop all filters.

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

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


[Django] #30703: Make RelatedFieldListFilter respect model meta ordering

2019-08-12 Thread Django
#30703: Make RelatedFieldListFilter respect model meta ordering
-+
   Reporter:  Perlence   |  Owner:  nobody
   Type:  Bug| Status:  new
  Component:  contrib.admin  |Version:  2.2
   Severity:  Normal |   Keywords:  filter
   Triage Stage:  Unreviewed |  Has patch:  1
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+
 The Django admin list filter stopped using the model meta ordering after
 the pull request for #29835 got merged. If there's no ModelAdmin.ordering
 set, the order of related choices will be reset.

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

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


Re: [Django] #30403: Test namespace packages discover fails to load module.

2019-08-12 Thread Django
#30403: Test namespace packages discover fails to load module.
+--
 Reporter:  Jonny Fuller|Owner:  nobody
 Type:  Bug |   Status:  closed
Component:  Testing framework   |  Version:  2.2
 Severity:  Normal  |   Resolution:  invalid
 Keywords:  namespace packages  | Triage Stage:  Unreviewed
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+--

Comment (by Roger Gammans):

 Adding a \_\_init\_\_.py prevents distrubition from outside the current
 directory contribuitng to the namepscae packages; so would in my case
 break my application. ( But this I'l follwo this up on the cpython  bug )

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

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


Re: [Django] #30702: Form leaks all objects of model

2019-08-12 Thread Django
#30702: Form leaks all objects of model
-+-
 Reporter:  Kevin Olbrich|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Forms|  Version:  2.2
 Severity:  Normal   |   Resolution:  invalid
 Keywords:  form, forms, | Triage Stage:
  queryset   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Claude Paroz):

 I guess Carlton closed your report because it sounds like an error in your
 code. Your report does not contain any hint that Django is at fault.
 Please explore a little more what's happening in your case.

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

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


Re: [Django] #30694: Document FileResponse does not seek its file source (was: FileResponse does not seek its file source)

2019-08-12 Thread Django
#30694: Document FileResponse does not seek its file source
---+--
 Reporter:  Claude Paroz   |Owner:  nobody
 Type:  Bug|   Status:  closed
Component:  Documentation  |  Version:  2.2
 Severity:  Normal |   Resolution:  wontfix
 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 Claude Paroz):

 * component:  HTTP handling => Documentation


Comment:

 Something like that?:
 {{{
 diff --git a/docs/ref/request-response.txt b/docs/ref/request-response.txt
 index 19593dfb90..3dfbf28cf6 100644
 --- a/docs/ref/request-response.txt
 +++ b/docs/ref/request-response.txt
 @@ -1122,6 +1122,8 @@ Attributes

  If ``open_file`` doesn't have a name or if the name of ``open_file``
 isn't
  appropriate, provide a custom file name using the ``filename``
 parameter.
 +Note that if you pass a file-like object like ``io.BytesIO``, it's
 your
 +task to ``seek()`` it before passing it to ``FileResponse``.

  The ``Content-Length`` and ``Content-Type`` headers are automatically
 set
  when they can be guessed from contents of ``open_file``.
 }}}
 I suspect the example in https://docs.djangoproject.com/en/2.2/howto
 /outputting-pdf/#write-your-view is missing the seek call.

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

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


Re: [Django] #30702: Form leaks all objects of model

2019-08-12 Thread Django
#30702: Form leaks all objects of model
-+-
 Reporter:  Kevin Olbrich|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Forms|  Version:  2.2
 Severity:  Normal   |   Resolution:  invalid
 Keywords:  form, forms, | Triage Stage:
  queryset   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Kevin Olbrich):

 Actually I think this is a serious bug.
 Do you expect Django to leak all model data on an error?
 You can try it yourself, all model data will be rendered instead of the
 query sets filtered data.

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

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


Re: [Django] #30702: Form leaks all objects of model

2019-08-12 Thread Django
#30702: Form leaks all objects of model
-+-
 Reporter:  Kevin Olbrich|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Forms|  Version:  2.2
 Severity:  Normal   |   Resolution:  invalid
 Keywords:  form, forms, | Triage Stage:
  queryset   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Carlton Gibson):

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


Comment:

 Sorry, this isn't an Issue Report as it stands. (It's a usage question.)
 Please see TicketClosingReasons/UseSupportChannels.

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

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


Re: [Django] #30701: Allowing patch_vary_headers() caching utility to handle '*' value. (was: Django generates overly verbose and possibly invalid Vary headers)

2019-08-12 Thread Django
#30701: Allowing patch_vary_headers() caching utility to handle '*' value.
-+
 Reporter:  Alexander-TX |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Core (Cache system)  |  Version:  2.2
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+
Changes (by Carlton Gibson):

 * type:  Bug => New feature
 * stage:  Unreviewed => Accepted
 * component:  HTTP handling => Core (Cache system)


Comment:

 Hi Alexander. Thanks for the report.

 Happy to accept this as an enhancement. (It's clear from the existing test
 cases that `'*'` was never considered.)

 I was going to uncheck "Easy Pickings" but perhaps it is simple enough...

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

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


[Django] #30702: Form leaks all objects of model

2019-08-12 Thread Django
#30702: Form leaks all objects of model
-+-
   Reporter:  Kevin  |  Owner:  nobody
  Olbrich|
   Type:  Bug| Status:  new
  Component:  Forms  |Version:  2.2
   Severity:  Normal |   Keywords:  form, forms,
   Triage Stage: |  queryset
  Unreviewed |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 Hi!

 During development I had to filter the possible values in my form based on
 the logged in user:

 {{{
 class DomainRegisterForm(UserKwargModelFormMixin, forms.Form):
 domain = forms.CharField(label='Domain', max_length=100)
 customer =
 forms.ModelChoiceField(queryset=MdatCustomers.objects.none())

 def __init__(self, *args, **kwargs):
 super(DomainRegisterForm, self).__init__(*args, **kwargs)
 self.fields['customer'].queryset =
 MdatCustomers.objects.filter(mdatmultitenancyusers__user=self.user)
 }}}

 UserKwargModelFormMixin is from django-braces and simply does pull the
 user from the request:

 {{{
 class UserKwargModelFormMixin(object):
 """
 Generic model form mixin for popping user out of the kwargs and
 attaching it to the instance.

 This mixin must precede forms.ModelForm/forms.Form. The form is not
 expecting these kwargs to be passed in, so they must be popped off
 before
 anything else is done.
 """
 def __init__(self, *args, **kwargs):
 self.user = kwargs.pop("user", None)  # Pop the user off the
   # passed in kwargs.
 super(UserKwargModelFormMixin, self).__init__(*args, **kwargs)

 }}}

 The values are shown correctly on first load of the form. I can choose the
 value and send it.

 I've met two issues with this:
 1) After submit of the form, I get an "invalid_choice" error. The value
 I'd chosen is then filtered from the queryset even if it was valid.
 2) The queryset is not filtered anymore, it shows ALL values (like:
 MdatCustomers.objects.all() ).

 As I use this to give a user access to multiple companies, I absolutely
 don't want them to browse all ;-)

 I did some research in the code but was unable to spot where this happens.

 Kind regards
 Kevin

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

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


[Django] #30701: Django generates overly verbose and possibly invalid Vary headers

2019-08-12 Thread Django
#30701: Django generates overly verbose and possibly invalid Vary headers
-+
   Reporter:  Alexander-TX   |  Owner:  nobody
   Type:  Bug| Status:  new
  Component:  HTTP handling  |Version:  2.2
   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  |
-+
 Function "patch_vary_headers", simply appends new headers to list. If view
 code sets Vary header to asterisk, the resulting header (after applying
 SessionMiddleware and LocaleMiddleware) looks like this:

 {{{
 Vary: *, Accept-Language, Cookie
 }}}

 This is unnecessary and possible violates HTTP spec:

 {{{
 The "Vary" header field in a response describes what parts of a
request message, aside from the method, Host header field, and
request target, might influence the origin server's process for
selecting and representing this response.  The value consists of
either a single asterisk ("*") or a list of header field names
(case-insensitive).

  Vary = "*" / 1#field-name
 }}}

 (from https://tools.ietf.org/html/rfc7231#page-70)

 I am using Django to implement REST API, so I'd like it to speak robust
 HTTP, that works with all present and future caching libraries, — even if
 widely used browsers and Nginx can correctly interpret current form of the
 header.

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

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


Re: [Django] #30698: `BaseDetailView` and `SingleObjectMixin` optimization.

2019-08-12 Thread Django
#30698: `BaseDetailView` and `SingleObjectMixin` optimization.
-+-
 Reporter:  Davit Gachechiladze  |Owner:  Davit
 Type:   |  Gachechiladze
  Cleanup/optimization   |   Status:  closed
Component:  Generic views|  Version:  master
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Davit Gachechiladze):

 Replying to [comment:17 Carlton Gibson]:
 > Hi Davit,
 >
 > Thanks for the suggestion. Strictly you're right, in theory this
 simplification is available. We can't make it, however.
 >
 > Firstly, they'll be plenty of folks that overrode `get_context_data()`
 relying on the fact that `self.object` is injected.
 > (We change it, we break their code.)
 >
 > Then, removing relies too much on internal knowledge of the CBV
 implementations.
 >
 > The general pattern for `get_context_data()` is this:
 >
 > {{{
 > def get_context_data(self, **kwargs):
 > context = {
 > # Some stuff...
 > }
 >
 > # Allow caller to inject the values we want...
 > context.update(kwargs)
 >
 > return context
 > }}}
 >
 > Without looking at `SingleObjectMixin` at all, the implementation of
 BaseDetailView.get() is exactly what one want's: we want the calling
 function to ''drive'' `get_context_data() by passing in the object to be
 rendered.
 >
 > I don't know if you've seen them but check out http://django-vanilla-
 views.org/ for a stripped back take on GCBVs here.
 Thank you for explanation.

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

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


Re: [Django] #30698: `BaseDetailView` and `SingleObjectMixin` optimization.

2019-08-12 Thread Django
#30698: `BaseDetailView` and `SingleObjectMixin` optimization.
-+-
 Reporter:  Davit Gachechiladze  |Owner:  Davit
 Type:   |  Gachechiladze
  Cleanup/optimization   |   Status:  closed
Component:  Generic views|  Version:  master
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Carlton Gibson):

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


Comment:

 Hi Davit,

 Thanks for the suggestion. Strictly you're right, in theory this
 simplification is available. We can't make it, however.

 Firstly, they'll be plenty of folks that overrode `get_context_data()`
 relying on the fact that `self.object` is injected.
 (We change it, we break their code.)

 Then, removing relies too much on internal knowledge of the CBV
 implementations.

 The general pattern for `get_context_data()` is this:

 {{{
 def get_context_data(self, **kwargs):
 context = {
 # Some stuff...
 }

 # Allow caller to inject the values we want...
 context.update(kwargs)

 return context
 }}}

 Without looking at `SingleObjectMixin` at all, the implementation of
 BaseDetailView.get() is exactly what one want's: we want the calling
 function to ''drive'' `get_context_data() by passing in the object to be
 rendered.

 I don't know if you've seen them but check out http://django-vanilla-
 views.org/ for a stripped back take on GCBVs here.

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

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


Re: [Django] #30699: Remove `PublisherDetail.get_context_data()` from documentation

2019-08-12 Thread Django
#30699: Remove `PublisherDetail.get_context_data()` from documentation
-+-
 Reporter:  Davit Gachechiladze  |Owner:  Davit
 Type:   |  Gachechiladze
  Cleanup/optimization   |   Status:  closed
Component:  Documentation|  Version:  2.2
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Davit Gachechiladze):

 Replying to [comment:2 Carlton Gibson]:
 > I think the override is serving a purpose here:
 >
 > > We have to think carefully about get_context_data(). Since both
 SingleObjectMixin and ListView will put things in the context data under
 the value of context_object_name if it’s set, we’ll instead explicitly
 ensure the Publisher is in the context data.
 >
 > Removing it is fragile. (Without it, as soon as I set
 `context_object_name` my code would break.)
 >
 > With this discussion kind of topic there's always other/better ways to
 do things but in context I think the existing example is fine.
 >
 > Thanks for the input.
 I understand. 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.2c6f5576d9b6e86dcd76f3291f64%40djangoproject.com.


Re: [Django] #30699: Remove `PublisherDetail.get_context_data()` from documentation

2019-08-12 Thread Django
#30699: Remove `PublisherDetail.get_context_data()` from documentation
-+-
 Reporter:  Davit Gachechiladze  |Owner:  Davit
 Type:   |  Gachechiladze
  Cleanup/optimization   |   Status:  closed
Component:  Documentation|  Version:  2.2
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Carlton Gibson):

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


Comment:

 I think the override is serving a purpose here:

 > We have to think carefully about get_context_data(). Since both
 SingleObjectMixin and ListView will put things in the context data under
 the value of context_object_name if it’s set, we’ll instead explicitly
 ensure the Publisher is in the context data.

 Removing it is fragile. (Without it, as soon as I set
 `context_object_name` my code would break.)

 With this discussion kind of topic there's always other/better ways to do
 things but in context I think the existing example is fine.

 Thanks for the input.

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

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


Re: [Django] #25367: Allow expressions in .filter() calls

2019-08-12 Thread Django
#25367: Allow expressions in .filter() calls
-+-
 Reporter:  Anssi Kääriäinen |Owner:  Matthew
 Type:   |  Schinckel
  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:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Mariusz Felisiak ):

 In [changeset:"f7e9db14bbd39a393260d0a8b44aae80cbb65c81" f7e9db14]:
 {{{
 #!CommitTicketReference repository=""
 revision="f7e9db14bbd39a393260d0a8b44aae80cbb65c81"
 Refs #25367 -- Added test for Exists() lookup rhs.
 }}}

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

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


Re: [Django] #30686: Improve utils.text.Truncator to use a full HTML parser.

2019-08-12 Thread Django
#30686: Improve utils.text.Truncator  to use a full HTML parser.
---+
 Reporter:  Thomas Hooper  |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  Utilities  |  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 Carlton Gibson):

 Duplicate in #30700, with [https://github.com/django/django/pull/11660
 failing test case provided].

 I've tried contacting maintainers of HTML5lib with no success.

 I've re-opened https://github.com/django/django/pull/11633 (original regex
 based suggestion) so we can at least assess it as a possible stop-gap.

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

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


Re: [Django] #30700: templatetag truncatechars_html breaks HTML entities

2019-08-12 Thread Django
#30700: templatetag truncatechars_html breaks HTML entities
---+--
 Reporter:  John Carter|Owner:  nobody
 Type:  Uncategorized  |   Status:  closed
Component:  Uncategorized  |  Version:  master
 Severity:  Normal |   Resolution:  duplicate
 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 Carlton Gibson):

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


Comment:

 Duplicate of #30686.

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

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


Re: [Django] #30694: FileResponse does not seek its file source

2019-08-12 Thread Django
#30694: FileResponse does not seek its file source
---+--
 Reporter:  Claude Paroz   |Owner:  nobody
 Type:  Bug|   Status:  closed
Component:  HTTP handling  |  Version:  2.2
 Severity:  Normal |   Resolution:  wontfix
 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 Carlton Gibson):

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


Comment:

 Hi Claude.

 > ...shouldn't FileResponse seek itself ...

 I think not here.

 I imagine a situation where you want to tail a log, say. You can't do that
 if we reset the stream position ourselves.

 I then think that resetting the stream makes `FileResponse` a little bit
 too clever. (Happy if someone wants to put that in a subclass, but it's
 beyond "take a buffer, stream it to an HTTP response", which is what I
 take to be the limit of the scope here.)

 So, for me, the maxim in play is, "You pass an open file. Your
 responsibility to `seek` accordingly".

 As such, I'm going to go with `wontfix`. I hope that makes sense.

 **Maybe** an addition to the FileResponse docs?

 > ...`streaming_content` begins from the current cursor position of
 `open_file`...

 (Or such, somewhere.)

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

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