MobileBlur

Check-in [678f5259f2]
Login

Check-in [678f5259f2]

Overview
Comment:Added a logout button
Timelines: family | ancestors | descendants | both | develop
Files: files | file ages | folders
SHA1: 678f5259f2512be9e736e919e1a540d9c8b0147c
User & Date: spiffy on 2011-11-20 22:51:34
Other Links: branch diff | manifest | tags
Context
2011-11-20
23:29
Added a button to mark a story as read check-in: da2e9d5879 user: spiffy tags: develop
22:51
Added a logout button check-in: 678f5259f2 user: spiffy tags: develop
21:04
Added a catch to handle a failed Newsblur login check-in: 759f07e810 user: spiffy tags: develop
Changes

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

25
26
27
28
29
30
31







            response.cookies["nb_cookie"]["path"] = "/"
            print "cookie =", newsblur.cookies
            redirect(URL("index"))
        except Exception as ex:
            login_form.insert(-1, ex.message)

    return dict(login_form=login_form)














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

    return dict(login_form=login_form)


def logout():
    response.cookies["nb_cookie"] = ""
    response.cookies["nb_cookie"]["expires"] = -10
    response.cookies["nb_cookie"]["path"] = "/"
    redirect(URL("index"))

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

100
101
102
103
104
105
106

107
108
109
110
111
112
113
          <div id="left_sidebar" {{=XML(left_sidebar_style)}} >
            <div style="padding: 4px;">
	      {{block left_sidebar}}Content Left Sidebar{{end}}		  
            </div>
          </div><!-- left_sidebar -->
	  {{pass}}


	  <!-- content -->
	  <div id="content" {{=XML(style_content)}} >
	    {{include}}	
	  </div>
	  <!-- content -->

	  {{if right_sidebar_enabled:}}







>







100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
          <div id="left_sidebar" {{=XML(left_sidebar_style)}} >
            <div style="padding: 4px;">
	      {{block left_sidebar}}Content Left Sidebar{{end}}		  
            </div>
          </div><!-- left_sidebar -->
	  {{pass}}

      <a href="{{= URL("default", "logout") }}">Log out</a>
	  <!-- content -->
	  <div id="content" {{=XML(style_content)}} >
	    {{include}}	
	  </div>
	  <!-- content -->

	  {{if right_sidebar_enabled:}}