AlanBell | in summit how would I set a cookie to give to the browser? | 08:25 |
---|---|---|
cjohnston | mhall119: ^^ | 10:42 |
mhall119 | AlanBell: HttpResponse.set_cookie(key, value='', max_age=None, expires=None, path='/', domain=None, secure=None, httponly=True) | 11:30 |
AlanBell | oh great, so I can set that in the model code? | 11:31 |
cjohnston | Amoz: I figured out the footer thing | 12:28 |
mhall119 | AlanBell: no, you'llhave to do it in the view | 12:35 |
mhall119 | HttpResponse is what your view code returns | 12:35 |
mhall119 | so just call set_cookie on the return value before you return it | 12:35 |
AlanBell | ok, so in _show_meeting in views.py | 12:41 |
AlanBell | I was a bit confused by the templates | 12:42 |
mhall119 | AlanBell: how so? | 12:53 |
AlanBell | I was trying to figure out how to set a cooke in the meeting.html | 12:53 |
AlanBell | and it wasn't tying up with the documentation about django I was reading | 12:54 |
mhall119 | AlanBell: you don't set cookies in the template | 12:58 |
mhall119 | you set them in the view code | 12:58 |
mhall119 | render_to_response return an instance of HttpResponse | 12:59 |
mhall119 | you'll need to put that in a variable, then call set_cookie on the variable, then return it | 12:59 |
mhall119 | AlanBell: what are you setting a cookie for anyway? | 12:59 |
cjohnston | mhall119: I assume logging into etherpad | 13:00 |
mhall119 | hey, are we going to switch to EP lite for UDS-Q? | 13:01 |
AlanBell | etherpad lite | 13:01 |
mhall119 | yeah | 13:01 |
AlanBell | the summit server can talk to the pad server and create a pad, and create an author and create a session to link an author to a pad (or a group stricktly speaking I think) | 13:02 |
AlanBell | that creates a session and you have to give the session ID to the browser in a cookie | 13:02 |
AlanBell | so you will log into summit and it will know who you are | 13:02 |
AlanBell | if you don't log in you get a live read-only pad, but you can use the comments | 13:02 |
AlanBell | if it is a private session it will probably create a group specificially for that session | 13:03 |
AlanBell | the pad server and summit server need to have the same domain *.ubuntu.com for the cookie to be shared I think | 13:03 |
=== johnoxton_ is now known as johnoxton | ||
=== johnoxton__ is now known as johnoxton | ||
cjohnston | Amoz: ping | 21:33 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!