3rd_fix download
This commit is contained in:
13
check_users_simple.py
Normal file
13
check_users_simple.py
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import sys, os
|
||||
sys.path.insert(0, os.path.join(os.getcwd(), 'app'))
|
||||
from app import create_app
|
||||
from app.models import User
|
||||
app = create_app()
|
||||
with app.app_context():
|
||||
users = User.query.all()
|
||||
print(f'總用戶數: {len(users)}')
|
||||
for user in users:
|
||||
print(f'ID: {user.id}, 用戶名: {user.username}, Email: {user.email}')
|
||||
|
Reference in New Issue
Block a user