示例#1
0
 def get(self):
     user = users.get_current_user()
     logout_url = users.create_logout_url("/")
     account = Account.get_by_user(user)
     pending_channels = Channel.get_all_by_target(account).filter("status =", "pending")
     enabled_channels = Channel.get_all_by_target(account).filter("status =", "enabled")
     self.response.out.write(template.render("templates/dashboard_sources.html", locals()))
示例#2
0
 def post(self):
     user = users.get_current_user()
     account = Account.get_by_user(user)
     action = self.request.get("action")
     if action == "approve":
         source = Account.get_by_hash(self.request.get("source"))
         channel = Channel.get_by_source_and_target(source, account)
         channel.status = "enabled"
         channel.put()
     if action == "disable":
         source = Account.get_by_hash(self.request.get("source"))
         channel = Channel.get_by_source_and_target(source, account)
         channel.status = "disabled"
     self.redirect("/dashboard/sources")
示例#3
0
 def get(self):
     user = users.get_current_user()
     logout_url = users.create_logout_url("/")
     account = Account.all().filter("user ="******"status =", "pending")
     self.response.out.write(template.render("templates/dashboard_settings.html", locals()))
示例#4
0
 def get(self):
     user = users.get_current_user()
     logout_url = users.create_logout_url("/")
     account = Account.all().filter("user ="******"status =", "pending")
     notifications = Notification.all().filter("target =", account).order("-created").fetch(1000)
     self.response.out.write(template.render("templates/dashboard_history.html", locals()))