Show More
@@ -182,7 +182,10 b' class LoginHandler(AuthenticatedHandler):' | |||||
182 | ) |
|
182 | ) | |
183 |
|
183 | |||
184 | def get(self): |
|
184 | def get(self): | |
185 |
self. |
|
185 | if self.current_user: | |
|
186 | self.redirect(self.get_argument('next', default='/')) | |||
|
187 | else: | |||
|
188 | self._render() | |||
186 |
|
189 | |||
187 | def post(self): |
|
190 | def post(self): | |
188 | pwd = self.get_argument('password', default=u'') |
|
191 | pwd = self.get_argument('password', default=u'') |
@@ -23,7 +23,9 b'' | |||||
23 | <div id="header"> |
|
23 | <div id="header"> | |
24 | <span id="ipython_notebook"><h1>IPython Notebook</h1></span> |
|
24 | <span id="ipython_notebook"><h1>IPython Notebook</h1></span> | |
25 | <span id="login_widget"> |
|
25 | <span id="login_widget"> | |
26 | <button id="logout">Logout</button> |
|
26 | {% if current_user and current_user != 'anonymous' %} | |
|
27 | <button id="logout">Logout</button> | |||
|
28 | {% end %} | |||
27 | </span> |
|
29 | </span> | |
28 | {% block header %} |
|
30 | {% block header %} | |
29 | {% end %} |
|
31 | {% end %} |
General Comments 0
You need to be logged in to leave comments.
Login now