Re: [Django] #24501: Documentation for user_passes_test is wrong and confusing

2015-03-24 Thread Django
#24501: Documentation for user_passes_test is wrong and confusing
-+-
 Reporter:  lietu|Owner:
 Type:   |  mattseymour
  Cleanup/optimization   |   Status:  closed
Component:  Documentation|  Version:  1.7
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"388dc33f5bfdd7035f4a32c4ec1eea269eb88870" 388dc33f]:
 {{{
 #!CommitTicketReference repository=""
 revision="388dc33f5bfdd7035f4a32c4ec1eea269eb88870"
 [1.7.x] Fixed #24501 -- Improved auth.decorators.user_passes_test()
 example.

 Backport of fca14cd3f27a01f7ba1fe32ea9587fa75b85713a from master
 }}}

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


Re: [Django] #24501: Documentation for user_passes_test is wrong and confusing

2015-03-24 Thread Django
#24501: Documentation for user_passes_test is wrong and confusing
-+-
 Reporter:  lietu|Owner:
 Type:   |  mattseymour
  Cleanup/optimization   |   Status:  closed
Component:  Documentation|  Version:  1.7
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"09933aef684e4d53042eceab2e75646fe7760154" 09933ae]:
 {{{
 #!CommitTicketReference repository=""
 revision="09933aef684e4d53042eceab2e75646fe7760154"
 [1.8.x] Fixed #24501 -- Improved auth.decorators.user_passes_test()
 example.

 Backport of fca14cd3f27a01f7ba1fe32ea9587fa75b85713a from master
 }}}

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


Re: [Django] #24501: Documentation for user_passes_test is wrong and confusing

2015-03-24 Thread Django
#24501: Documentation for user_passes_test is wrong and confusing
-+-
 Reporter:  lietu|Owner:
 Type:   |  mattseymour
  Cleanup/optimization   |   Status:  closed
Component:  Documentation|  Version:  1.7
 Severity:  Normal   |   Resolution:  fixed
 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 Tim Graham ):

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


Comment:

 In [changeset:"fca14cd3f27a01f7ba1fe32ea9587fa75b85713a" fca14cd3]:
 {{{
 #!CommitTicketReference repository=""
 revision="fca14cd3f27a01f7ba1fe32ea9587fa75b85713a"
 Fixed #24501 -- Improved auth.decorators.user_passes_test() example.
 }}}

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


Re: [Django] #24501: Documentation for user_passes_test is wrong and confusing

2015-03-22 Thread Django
#24501: Documentation for user_passes_test is wrong and confusing
-+-
 Reporter:  lietu|Owner:
 Type:   |  mattseymour
  Cleanup/optimization   |   Status:  assigned
Component:  Documentation|  Version:  1.7
 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 mattseymour):

 * has_patch:  0 => 1


Comment:

 Added pull request at : [https://github.com/django/django/pull/4369]

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


Re: [Django] #24501: Documentation for user_passes_test is wrong and confusing

2015-03-22 Thread Django
#24501: Documentation for user_passes_test is wrong and confusing
-+-
 Reporter:  lietu|Owner:
 Type:   |  mattseymour
  Cleanup/optimization   |   Status:  assigned
Component:  Documentation|  Version:  1.7
 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 mattseymour):

 * status:  new => assigned
 * owner:  nobody => mattseymour


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


Re: [Django] #24501: Documentation for user_passes_test is wrong and confusing

2015-03-18 Thread Django
#24501: Documentation for user_passes_test is wrong and confusing
--+
 Reporter:  lietu |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Documentation |  Version:  1.7
 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 bmispelon):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * easy:  0 => 1
 * needs_docs:   => 0
 * type:  Bug => Cleanup/optimization
 * stage:  Unreviewed => Accepted


Comment:

 Hi,

 You're right, the two examples are inconsistent and can be confusing.

 There's definitely room for improvement here.

 Thanks.

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

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


[Django] #24501: Documentation for user_passes_test is wrong and confusing

2015-03-18 Thread Django
#24501: Documentation for user_passes_test is wrong and confusing
---+
 Reporter:  lietu  |  Owner:  nobody
 Type:  Bug| Status:  new
Component:  Documentation  |Version:  1.7
 Severity:  Normal |   Keywords:
 Triage Stage:  Unreviewed |  Has patch:  0
Easy pickings:  0  |  UI/UX:  0
---+
 On the page https://docs.djangoproject.com/en/1.7/topics/auth/default/ it
 says on "Limiting access to logged-in users that pass a test" (
 https://docs.djangoproject.com/en/1.7/topics/auth/default/#limiting-
 access-to-logged-in-users-that-pass-a-test ) the following:

   {{{
   The simple way is to run your test on request.user in the view directly.
 For example, this view checks to make sure the user has an email in the
 desired domain:

   def my_view(request):
   if not request.user.email.endswith('@example.com'):
   return HttpResponse("You can't vote in this poll.")
   # ...
   }}}

 Then under that there's the "user_passes_test" -documentation and it's
 mentioned to be a shortcut for the above.

 This is just plain wrong, user_passes_test checks for something, then
 redirects to login page if the test fails. It does not return
 HttpResponse("You can't vote in this poll.") and it definitely does not
 return the 403 that makes me expect it to return.

 Also there is only a very casual mention of the "login_url" argument but
 no mention of what it could possibly be used for, e.g. redirecting users
 there if the test fails.

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