def POST(self): global taxes with open(settings.taxonomy_path, 'w') as f: try: x = web.input(myfile={}) taxes = [taxonomy.parse_xml(x['myfile'].file)] raise web.seeother("/static/index.html") except Exception as e: taxes = [] raise web.seeother("/static/index.html?%s" % e.message) finally: cPickle.dump(taxes, f) map_terms()
def POST(self, id): form = self.form() anime = anidb.query(anidb.QUERY_ANIME, int(id)) if not form.validates(): return render.add(form, anime) metadata.newAnime(anime, form.d.subber, form.d.location, form.d.airTime, form.d.quality) raise web.seeother('/anime/%s' % int(id))
def POST(self, id): form = self.form() anime = anidb.query(anidb.QUERY_ANIME, int(id)) if not form.validates(): return render.add(form, anime) metadata.newAnime(anime, form.d.subber, form.d.location, form.d.quality) raise web.seeother('/anime/%s' % int(id))
def GET(self, id): metadata.refreshForAnime(int(id)) raise web.seeother('/anime/%s' % id)
def GET(self, id): model.remove_anime(id) raise web.seeother('/')
def manage_interceptor(next): user = ctx.request.user if user and user.admin: return next() raise seeother('/signin')
def manage_index(): raise seeother('/manage/blogs')
def signout(): ctx.response.delete_cookie(_COOKIE_NAME) raise seeother('/')
def GET(self): raise web.seeother(settings.root_url)