Child: [ddf08c] (diff)

Download this file

022-change-anon-display-name.py    12 lines (9 with data), 293 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from ming.orm.ormsession import ThreadLocalORMSession
from allura import model as M
def main():
u = M.User.query.get(username='*anonymous')
u.display_name = 'Anonymous'
ThreadLocalORMSession.flush_all()
ThreadLocalORMSession.close_all()
if __name__ == '__main__':
main()