MobileBlur

Check-in [678f5259f2]
Login
Overview
SHA1:678f5259f2512be9e736e919e1a540d9c8b0147c
Date: 2011-11-20 22:51:34
User: spiffy
Comment:Added a logout button
Timelines: family | ancestors | descendants | both | develop
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2011-11-20
23:29
[da2e9d5879] Added a button to mark a story as read (user: spiffy, tags: develop)
22:51
[678f5259f2] Added a logout button (user: spiffy, tags: develop)
21:04
[759f07e810] Added a catch to handle a failed Newsblur login (user: spiffy, tags: develop)
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Modified applications/mobileblur/controllers/default.py from [4edf6967cb] to [359e777bf1].

    25     25               response.cookies["nb_cookie"]["path"] = "/"
    26     26               print "cookie =", newsblur.cookies
    27     27               redirect(URL("index"))
    28     28           except Exception as ex:
    29     29               login_form.insert(-1, ex.message)
    30     30   
    31     31       return dict(login_form=login_form)
           32  +
           33  +
           34  +def logout():
           35  +    response.cookies["nb_cookie"] = ""
           36  +    response.cookies["nb_cookie"]["expires"] = -10
           37  +    response.cookies["nb_cookie"]["path"] = "/"
           38  +    redirect(URL("index"))

Modified applications/mobileblur/views/layout.html from [78b7d8a5ef] to [eb19032d37].

   100    100             <div id="left_sidebar" {{=XML(left_sidebar_style)}} >
   101    101               <div style="padding: 4px;">
   102    102   	      {{block left_sidebar}}Content Left Sidebar{{end}}		  
   103    103               </div>
   104    104             </div><!-- left_sidebar -->
   105    105   	  {{pass}}
   106    106   
          107  +      <a href="{{= URL("default", "logout") }}">Log out</a>
   107    108   	  <!-- content -->
   108    109   	  <div id="content" {{=XML(style_content)}} >
   109    110   	    {{include}}	
   110    111   	  </div>
   111    112   	  <!-- content -->
   112    113   
   113    114   	  {{if right_sidebar_enabled:}}