Re: [Django] #25770: authenticate and login can not write cookie 'sessionid'

2015-11-17 Thread Django
#25770: authenticate and login can not write cookie 'sessionid'
-+-
 Reporter:  mrgaolei |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  contrib.auth |  Version:  1.8
 Severity:  Normal   |   Resolution:  invalid
 Keywords:  authenticate login   | Triage Stage:
  session|  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by mrgaolei):

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


Re: [Django] #25770: authenticate and login can not write cookie 'sessionid'

2015-11-17 Thread Django
#25770: authenticate and login can not write cookie 'sessionid'
-+-
 Reporter:  mrgaolei |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  contrib.auth |  Version:  1.8
 Severity:  Normal   |   Resolution:
 Keywords:  authenticate login   | Triage Stage:
  session|  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by mrgaolei):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 Is my fault!
 I don't return any HttpResponse, so the status of HTTP is not 2xx or 3xx,
 so any session operation are rollback.

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


[Django] #25770: authenticate and login can not write cookie 'sessionid'

2015-11-17 Thread Django
#25770: authenticate and login can not write cookie 'sessionid'
--+
 Reporter:  mrgaolei  |  Owner:  nobody
 Type:  Bug   | Status:  new
Component:  contrib.auth  |Version:  1.8
 Severity:  Normal|   Keywords:  authenticate login session
 Triage Stage:  Unreviewed|  Has patch:  0
Easy pickings:  0 |  UI/UX:  0
--+
 If I use 'django.contrib.auth.urls' login, everything are OK, cookie
 'sessionid' writes to Browser.

 But, when I login Manually, like:

 {{{
 from django.contrib.auth import authenticate, login, logout
 def some_view(request):
 user = authenticate(username="mrgaolei", password="123456")
 if user is not None:
 login(request, user)
 }}}

 No any exceptions, but user not loginged, and no cookie 'sessionid' writes
 to Browser.
 My settings.py is generated by manage.py startproject.

 I tried capture login status like:

 {{{
 from django.contrib.auth import authenticate, login, logout
 def some_view(request):
 print request.user.is_authenticated()
 user = authenticate(username="mrgaolei", password="123456")
 if user is not None:
 login(request, user)
 print request.user.is_authenticated()
 }}}

 When I refresh this url, terminal output:
 {{{
 False
 True
 }}}

 It seems the 'login' method writes the 'sessionid` cookie expire only 1
 second.
 Is this a bug? Or my fault?

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