La til slabbedasker.py, ett kort lite script som finner ut hvem som har negativ kreditt.

(\ /)
(^.^)
(> <) Bunny happy, good change.
This commit is contained in:
Øyvind Almelid 2015-07-05 19:21:18 +00:00
parent 9d5b2d0907
commit e53b680dd2
1 changed files with 9 additions and 0 deletions

9
slabbedasker.py Executable file
View File

@ -0,0 +1,9 @@
#!/usr/bin/python
from db import *
# Start an SQL session
session=Session()
# Let's find all users with a negative credit
slabbedasker=session.query(User).filter(User.credit<0).all()
for slubbert in slabbedasker:
print "%s, %s" % (slubbert.name, slubbert.credit)