Anonymous avatar Anonymous committed 24dd9b7


Comments (0)

Files changed (3)

 def main():
     application = webapp.WSGIApplication ([
                                         ('/a/', MainHandler),
 import re
 import urllib
 import fnmatch
+from google.appengine.api import users
 from google.appengine.ext import webapp
 from google.appengine.ext.webapp import util
 from django.utils import simplejson
         self.response.headers['Content-Type'] = "application/octet-stream; CHARSET=utf8"
         self.response.headers['Content-Disposition']='attachment; filename=%s' %'utf-8')
+class LogoutHandler(PublicHandler):
+    def get(self):
+        user = users.get_current_user()
+        if user:
+            return self.redirect(users.create_logout_url("/"))
 def main():
     application = webapp.WSGIApplication ([
+                                       ('/logout/',LogoutHandler),


 				<a href="/a/antileech/">防盗链</a>|
 				<a href="/a/copy/">一键复制</a>|
 				<a href="/a/api/">API设置</a>
+				<a href="/logout/">退出</a>
 			{% block content %}{% endblock %}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.