Example #1
0
 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()
Example #2
0
 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))
Example #3
0
 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))
Example #4
0
 def GET(self, id):
     metadata.refreshForAnime(int(id))
     raise web.seeother('/anime/%s' % id)
Example #5
0
 def GET(self, id):
     model.remove_anime(id)
     raise web.seeother('/')
Example #6
0
def manage_interceptor(next):
    user = ctx.request.user
    if user and user.admin:
        return next()
    raise seeother('/signin')
Example #7
0
def manage_index():
    raise seeother('/manage/blogs')
Example #8
0
def signout():
    ctx.response.delete_cookie(_COOKIE_NAME)
    raise seeother('/')
Example #9
0
 def GET(self):
     raise web.seeother(settings.root_url)
Example #10
0
def manage_interceptor(next):
    user = ctx.request.user
    if user and user.admin:
        return next()
    raise seeother('/signin')
Example #11
0
def manage_index():
    raise seeother('/manage/blogs')
Example #12
0
def signout():
    ctx.response.delete_cookie(_COOKIE_NAME)
    raise seeother('/')
Example #13
0
 def GET(self, id):
     metadata.refreshForAnime(int(id))
     raise web.seeother('/anime/%s' % id)
Example #14
0
 def GET(self, id):
     model.remove_anime(id)
     raise web.seeother('/')