#10166: Cookie test fails in login() view
-------------------------------------+--------------------------------------
          Reporter:  iakbar          |         Owner:  nobody                   
    
            Status:  new             |     Milestone:  1.1                      
    
         Component:  Authentication  |       Version:  1.0                      
    
        Resolution:                  |      Keywords:  authentication, cookie, 
login
             Stage:  Accepted        |     Has_patch:  1                        
    
        Needs_docs:  0               |   Needs_tests:  1                        
    
Needs_better_patch:  0               |  
-------------------------------------+--------------------------------------
Comment (by primski):

 > logic is, the test cookie is being checked for if and only if the
 request has been passed in __init__.

 true, but it fails out for the generic view users.

 Perhaps an optional variable could be passed to django.contrib.auth.login
 view, f.i. 'cookie_test = False', which would either pass the request
 object to the form or not.

 a simple one liner would do the trick then:

 {{{
  form = AuthenticationForm(data=request.POST, request = request) if
 cookie_test else AuthenticationForm(data=request.POST)
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/10166#comment:5>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to