![]() | |
Lenovo IdeaPad Slim 3 14ABR8 AMD Ryzen 5Lenovo IdeaPad Slim 3 14ABR8 82XL0004ID - ABYSS BLUE = LENOVO SLIM 3 82XL007CID R5-7530U/8GB/512GB/14.0/WIN11+OHS/ABYSS BLUE, Lenovo IdeaPad Slim 3 14ABR8 82XL0005ID - ARCTIC GREY = LENOVO SLIM 3 82XL007BID R5-7530U/8GB/512GB/14.0/WIN11+OHS/ARCTIC GREY Free Klik Disini ! |
from django.db import connections
def dictfetchall(cursor):
"Return all rows from a cursor as a dict"
columns = [col[0] for col in cursor.description]
return [
dict(zip(columns, row))
for row in cursor.fetchall()
]
def get_list_user():
with connections['example_db'].cursor() as cursor:
cursor.execute("""select * from users """)
connection.close()
row = dictfetchall(cursor)
return row
for x in get_list_user():
print(x['username'])
good luck ...!
Baca artikel lainya: