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')
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)