Skip to content

Commit d7ab2b2

Browse files
committed
demo: set all users with password 123
1 parent 122bdf2 commit d7ab2b2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

demo/apps/apijson_demo/dbinit.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@
9999
for d in user_list:
100100
if not User.get(User.c.username==d["username"]):
101101
print("create user '%s'"%(d["username"]))
102-
User(**d).save()
102+
u = User(**d)
103+
u.set_password("123")
104+
u.save()
103105
for d in privacy_list:
104106
user = User.get(User.c.username==d["username"])
105107
if user:

0 commit comments

Comments
 (0)