def GET(self): i = web.input(id=None, name=None) try: DB.delete('gps', where="id=" + i.id) except: print "Error Inesperado /deletegps:", sys.exc_info() raise web.seeother('/listgps')
def GET(self): i = web.input(id=None, placa=None) try: DB.delete('vehiculos', where="id=" + i.id) except: print "Error Inesperado /deletevehicle:", sys.exc_info() raise web.seeother('/listvehicle')
def GET(self): i = web.input(id=None) try: DB.delete('eventos', where="id=$i.id", vars=locals()) except: print "Error Inesperado /deleteclient:", sys.exc_info() raise web.seeother('/managevents')
def GET(self): i = web.input(id=None) try: DB.delete('clientes', where="id=" + i.id) except: print "Error Inesperado /deleteclient:", sys.exc_info() raise web.seeother('/listclient')
def GET(self): i = web.input(id=None) try: DB.delete('usuarios', where="id=" + i.id) except: print "Error Inesperado /deleteuser:", sys.exc_info() raise web.seeother('/listuser')
def setUp(self): DB.delete('articles', where='1=1') self.a = article.Article() self.a.url = test_url1 self.a.title = 'Test title' self.a.description = 'Test description' self.a.save()
def setUp(self): DB.delete('user_articles', where='1=1') DB.delete('user_sources', where='1=1') DB.delete('sources', where='1=1') DB.delete('users', where='1=1') DB.insert('users', id=user_id, name='Guest') self.s = source.Source(type='feed', url=test_url1) self.us = source.UserSource(user_id=user_id, source_id=self.s.id)
def setUp(self): DB.delete('user_opml', where='1=1') DB.delete('user_articles', where='1=1') DB.delete('user_sources', where='1=1') DB.delete('users', where='1=1') self.a = article.Article() self.a.url = test_url1 self.a.title = 'Test title' self.a.description = 'Test description' self.a.save() DB.insert('users', id=user_id, name='Guest')
def setUp(self): print 'TestUserArticle.setUp' DB.delete('user_sources', where='1=1') DB.delete('user_articles', where='1=1') DB.delete('users', where='1=1') self.a = article.Article() self.a.url = test_url1 self.a.title = 'Test title' self.a.description = 'Test description' self.a.save() DB.insert('users', id=user_id, name='Guest') self.ua = article.UserArticle(user_id=user_id, article_id=self.a.id) self.s = source.Source(type='feed', url=test_rss) self.us = source.UserSource(user_id=user_id, source_id=self.s.id) self.ua.add_location('source', self.s.id)
def setUp(self): DB.delete('sources', where='1=1') self.s = source.Source(type='feed', url=test_url1)