示例#1
0
文件: soviet.py 项目: 30n30n/WEEEhire
 def delete(self, uid, **kw):
     if not uid:
         abort(404)
     user = User.by_user_id(uid)
     if not user:
         abort(404)
     DBSession.delete(user)
     return redirect('/soviet')
示例#2
0
 def delete(self, m, auth, **kw):
     if not m or not auth:
         abort(404)
     user = User.by_user_name(m)
     if user:
         if user.token == auth:
             DBSession.delete(user)
             flash(_('Tutti i tuoi dati sono stati cancellati!'))
             return redirect('/')
     abort(404)