Re: [Django] #20218: Default authorization backend returns False when queried for object level permissions

2019-01-13 Thread Django
#20218: Default authorization backend returns False when queried for object 
level
permissions
--+
 Reporter:  soren@…   |Owner:  Mehmet Dogan
 Type:  Bug   |   Status:  assigned
Component:  contrib.auth  |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:  auth  | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Tobias Bengfort):

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


Re: [Django] #30093: Ordering a unioned queryset by an annotated field crashes (was: queryset, union, order_by over an annotated field)

2019-01-13 Thread Django
#30093: Ordering a unioned queryset by an annotated field crashes
-+-
 Reporter:  Lorenzo Mele |Owner:  Sergey
 |  Fedoseev
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  1.11
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  queryset union   | Triage Stage:  Ready for
  annotate   |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

 * stage:  Unreviewed => Ready for checkin


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

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


Re: [Django] #20147: Provide an alternative to request.META for accessing HTTP headers

2019-01-13 Thread Django
#20147: Provide an alternative to request.META for accessing HTTP headers
-+-
 Reporter:  Luke Plant   |Owner:  Santiago
 |  Basulto
 Type:  New feature  |   Status:  assigned
Component:  HTTP handling|  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
-+-
Changes (by Santiago Basulto):

 * cc: Santiago Basulto (added)
 * 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.0d5ea143addbc112ae969dae79f8b684%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #30099: Filter by Count annotated inside Subquery

2019-01-13 Thread Django
#30099: Filter by Count annotated inside Subquery
-+-
 Reporter:  MrFus10n |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  2.1
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  subquery annotate| Triage Stage:  Accepted
  filter |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Simon Charette):

 It'd be great if you could submit a Github Pull Request with your changes
 but if it's not possible could you report the traceback of failures?

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


Re: [Django] #27685: Allow autoreloader to use watchman

2019-01-13 Thread Django
#27685: Allow autoreloader to use watchman
-+-
 Reporter:  Aymeric Augustin |Owner:  Tom
 Type:   |  Forbes
  Cleanup/optimization   |   Status:  closed
Component:  Utilities|  Version:  master
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham ):

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


Comment:

 In [changeset:"c8720e7696ca41f3262d5369365cc1bd72a216ca" c8720e76]:
 {{{
 #!CommitTicketReference repository=""
 revision="c8720e7696ca41f3262d5369365cc1bd72a216ca"
 Fixed #27685 -- Added watchman support to the autoreloader.

 Removed support for pyinotify (refs #9722).
 }}}

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


Re: [Django] #9722: Use pyinotify (where available) instead of polling filesystem every second to detect changes

2019-01-13 Thread Django
#9722: Use pyinotify (where available) instead of polling filesystem every 
second
to detect changes
-+-
 Reporter:  Chris Lamb   |Owner:  Unai
 |  Zalakain
 Type:  New feature  |   Status:  closed
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Release blocker  |   Resolution:  fixed
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"c8720e7696ca41f3262d5369365cc1bd72a216ca" c8720e76]:
 {{{
 #!CommitTicketReference repository=""
 revision="c8720e7696ca41f3262d5369365cc1bd72a216ca"
 Fixed #27685 -- Added watchman support to the autoreloader.

 Removed support for pyinotify (refs #9722).
 }}}

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


Re: [Django] #30098: Permit using packages (directories) in custom django-admin commands.

2019-01-13 Thread Django
#30098: Permit using packages (directories) in custom django-admin commands.
-+-
 Reporter:  Andrey Volkov|Owner:  Andrey
 |  Volkov
 Type:  New feature  |   Status:  assigned
Component:  Core (Management |  Version:  2.1
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Andrey Volkov):

 * needs_better_patch:  1 => 0


Comment:

 Fixed documentation. All checks have passed.

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


Re: [Django] #30099: Filter by Count annotated inside Subquery

2019-01-13 Thread Django
#30099: Filter by Count annotated inside Subquery
-+-
 Reporter:  MrFus10n |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  2.1
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  subquery annotate| Triage Stage:  Accepted
  filter |
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by MrFus10n):

 I ran tests before changing anything and got {{{FAILED (failures=3,
 errors=3, skipped=948, expected failures=4)}}}. Is this ok?

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


Re: [Django] #30093: queryset, union, order_by over an annotated field

2019-01-13 Thread Django
#30093: queryset, union, order_by over an annotated field
-+-
 Reporter:  Lorenzo Mele |Owner:  Sergey
 |  Fedoseev
 Type:  Bug  |   Status:  assigned
Component:  Database layer   |  Version:  1.11
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  queryset union   | Triage Stage:
  annotate   |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Sergey Fedoseev):

 * status:  new => assigned
 * owner:  nobody => Sergey Fedoseev
 * has_patch:  0 => 1


Comment:

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


Re: [Django] #28478: Make DiscoverRunner skip creating a test database if not needed

2019-01-13 Thread Django
#28478: Make DiscoverRunner skip creating a test database if not needed
--+
 Reporter:  Tim Graham|Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Testing framework |  Version:  master
 Severity:  Release blocker   |   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+

Comment (by Tim Graham ):

 In [changeset:"a02a6fd5805f9f0e613b9951249555876b8c4041" a02a6fd5]:
 {{{
 #!CommitTicketReference repository=""
 revision="a02a6fd5805f9f0e613b9951249555876b8c4041"
 Refs #28478 -- Prevented connection creation in model_indexes tests.

 Entering a SchemaEditor instance creates a connection but it isn't needed
 for this test.
 }}}

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

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


Re: [Django] #28478: Make DiscoverRunner skip creating a test database if not needed

2019-01-13 Thread Django
#28478: Make DiscoverRunner skip creating a test database if not needed
--+
 Reporter:  Tim Graham|Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Testing framework |  Version:  master
 Severity:  Release blocker   |   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+

Comment (by Tim Graham):

 I don't expect user projects use `skipUnlessDBFeature` much (it would be
 more like libraries that test against different databases) so I don't a
 deprecation adds much benefit.

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


Re: [Django] #30102: Optimize the `page_not_found` view after #30070 (was: Optimize the `page_not_found` after #30070)

2019-01-13 Thread Django
#30102: Optimize the `page_not_found` view after #30070
-+-
 Reporter:  Illia Volochii   |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Core (Other) |  Version:  master
 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
-+-

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


[Django] #30102: Optimize the `page_not_found` after #30070

2019-01-13 Thread Django
#30102: Optimize the `page_not_found` after #30070
+
   Reporter:  Illia Volochii|  Owner:  nobody
   Type:  Cleanup/optimization  | Status:  new
  Component:  Core (Other)  |Version:  master
   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 |
+
 There is no need to use the template system
 
[https://github.com/django/django/blob/573f44d62fe1e87e2c20a74eba5e20ca9ff0ed85/django/views/defaults.py#L55
 here].
 The content has not got variables and can be just a byte string.

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


Re: [Django] #30101: Recommended middleware syntax fails for some testing cases (when not using Client)

2019-01-13 Thread Django
#30101: Recommended middleware syntax fails for some testing cases (when not 
using
Client)
-+-
 Reporter:  tdiam|Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Documentation|  Version:  2.1
 Severity:  Normal   |   Resolution:
 Keywords:  middleware, unit | Triage Stage:
  test, requestfactory, request, |  Unreviewed
  layering   |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Description changed by tdiam:

Old description:

> It is common for developers to prefer RequestFactory over Client in unit
> testing, or any similar module that mocks requests without processing the
> URLs or applying the enabled middleware. So, when a unit test needs to
> test a view while using a middleware, the easiest way to do so is:
>
> {{{
> #!python
> from django.test import RequestFactory
>
> from .views import MyView
> from .middleware import MyMiddleware
>
> request = RequestFactory().get('/')
> view = MyMiddleware(MyView)
> response = view(request)
> }}}
>
> Also, it may be needed to test views that accept arguments (e.g. captured
> URL parameters), which would probably look like this:
>
> {{{
> #!python
> request = RequestFactory().get('/articles/4/')
> response = MyView(request, pk=4)
> }}}
>
> The problem arises when we both use test views that accept parameters and
> a custom middleware. The current documentation offers examples for
> writing such a middleware:
>
> {{{
> #!python
> def MyMiddleware(get_response):
> # One-time configuration and initialization.
>
> def middleware(request):
> # Code to be executed for each request before
> # the view (and later middleware) are called.
>
> response = get_response(request)
>
> # Code to be executed for each request/response after
> # the view is called.
>
> return response
>
> return middleware
> }}}
>
> Given the above tests, one would expect this one to work as well as
> expected:
> {{{
> #!python
> request = RequestFactory().get('/articles/4/')
> view = MyMiddleware(MyView)
> response = view(request, pk=4)
> }}}
>
> However this is not the case, since the `middleware` function expects
> only a single positional argument and not the keyword argument `pk`, thus
> raising a TypeError.
>
> The attached files recommend a more flexible (albeit less simple) syntax
> and data flow for custom middleware that would prevent inexperienced
> developers from getting stuck here.

New description:

 It is common for developers to prefer RequestFactory over Client in unit
 testing, or any similar module that mocks requests without processing the
 URLs or applying the enabled middleware. So, when a unit test needs to
 test a view while using a middleware, the easiest way to do so is:

 {{{
 #!python
 from django.test import RequestFactory

 from .views import MyView
 from .middleware import MyMiddleware

 request = RequestFactory().get('/')
 view = MyMiddleware(MyView)
 response = view(request)
 }}}

 Also, it may be needed to test views that accept arguments (e.g. captured
 URL parameters), which would probably look like this:

 {{{
 #!python
 request = RequestFactory().get('/articles/4/')
 response = MyView(request, pk=4)
 }}}

 The problem arises when we both use test views that accept parameters and
 a custom middleware. The current documentation offers examples for writing
 such a middleware:

 {{{
 #!python
 def MyMiddleware(get_response):
 # One-time configuration and initialization.

 def middleware(request):
 # Code to be executed for each request before
 # the view (and later middleware) are called.

 response = get_response(request)

 # Code to be executed for each request/response after
 # the view is called.

 return response

 return middleware
 }}}

 Given the above tests, one would expect this one to work as expected too:
 {{{
 #!python
 request = RequestFactory().get('/articles/4/')
 view = MyMiddleware(MyView)
 response = view(request, pk=4)
 }}}

 However this is not the case, since the `middleware` function expects only
 a single positional argument and not the keyword argument `pk`, thus
 raising a TypeError.

 The attached files recommend a more flexible (albeit less simple) syntax
 and data flow for custom middleware that would prevent inexperienced
 developers from getting stuck here.

--

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


Re: [Django] #30101: Recommended middleware syntax fails for some testing cases (when not using Client)

2019-01-13 Thread Django
#30101: Recommended middleware syntax fails for some testing cases (when not 
using
Client)
-+-
 Reporter:  tdiam|Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Documentation|  Version:  2.1
 Severity:  Normal   |   Resolution:
 Keywords:  middleware, unit | Triage Stage:
  test, requestfactory, request, |  Unreviewed
  layering   |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-
Changes (by tdiam):

 * Attachment "middleware_syntax_in_docs.diff" added.

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


[Django] #30101: Recommended middleware syntax fails for some testing cases (when not using Client)

2019-01-13 Thread Django
#30101: Recommended middleware syntax fails for some testing cases (when not 
using
Client)
-+-
   Reporter:  tdiam  |  Owner:  nobody
   Type: | Status:  new
  Uncategorized  |
  Component: |Version:  2.1
  Documentation  |   Keywords:  middleware, unit
   Severity:  Normal |  test, requestfactory, request,
   Triage Stage: |  layering
  Unreviewed |  Has patch:  1
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  1
  UI/UX:  0  |
-+-
 It is common for developers to prefer RequestFactory over Client in unit
 testing, or any similar module that mocks requests without processing the
 URLs or applying the enabled middleware. So, when a unit test needs to
 test a view while using a middleware, the easiest way to do so is:

 {{{
 #!python
 from django.test import RequestFactory

 from .views import MyView
 from .middleware import MyMiddleware

 request = RequestFactory().get('/')
 view = MyMiddleware(MyView)
 response = view(request)
 }}}

 Also, it may be needed to test views that accept arguments (e.g. captured
 URL parameters), which would probably look like this:

 {{{
 #!python
 request = RequestFactory().get('/articles/4/')
 response = MyView(request, pk=4)
 }}}

 The problem arises when we both use test views that accept parameters and
 a custom middleware. The current documentation offers examples for writing
 such a middleware:

 {{{
 #!python
 def MyMiddleware(get_response):
 # One-time configuration and initialization.

 def middleware(request):
 # Code to be executed for each request before
 # the view (and later middleware) are called.

 response = get_response(request)

 # Code to be executed for each request/response after
 # the view is called.

 return response

 return middleware
 }}}

 Given the above tests, one would expect this one to work as well as
 expected:
 {{{
 #!python
 request = RequestFactory().get('/articles/4/')
 view = MyMiddleware(MyView)
 response = view(request, pk=4)
 }}}

 However this is not the case, since the `middleware` function expects only
 a single positional argument and not the keyword argument `pk`, thus
 raising a TypeError.

 The attached files recommend a more flexible (albeit less simple) syntax
 and data flow for custom middleware that would prevent inexperienced
 developers from getting stuck 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 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.3920e5559558e1cd180a3c54621ad824%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29943: Document that admin changelist adds `pk` to ordering

2019-01-13 Thread Django
#29943: Document that admin changelist adds `pk` to ordering
-+-
 Reporter:  Taha Jahangir|Owner:  Hasan
 Type:   |  Ramezani
  Cleanup/optimization   |   Status:  assigned
Component:  Documentation|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Hasan Ramezani):

 * needs_better_patch:  1 => 0


Comment:

 the comment from the mentioned ticket added to note.
 I also checked the override get_ordering(), so the behavior doesn't
 change.

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


Re: [Django] #30100: Add a Validator that uses Troy Hunts Have I been pwned Database to validate passwords.

2019-01-13 Thread Django
#30100: Add a Validator that uses Troy Hunts Have I been pwned Database to 
validate
passwords.
--+--
 Reporter:  Logan |Owner:  nobody
 Type:  New feature   |   Status:  closed
Component:  contrib.auth  |  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 Tim Graham):

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


Comment:

 I think that's a good candidate for a third-party package. If it matures
 and gets widespread adoption, we could consider including it in
 `contrib.auth`, however, I think that most projects won't want a network
 dependency for validating passwords. In that case, please make your
 proposal on the DevelopersMailingList as it reaches a wider audience than
 this ticket tracker.

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

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