Джанго проект

This commit is contained in:
Dronminator
2023-05-22 13:36:25 +03:00
parent f82732cd02
commit c5f7fc826e
137 changed files with 27484 additions and 3 deletions
@@ -0,0 +1,11 @@
import psycopg2
def getcont2():
connection = psycopg2.connect(host='localhost', dbname='dbdata', user='postgres', password='Q1w2e3r4')
cursor = connection.cursor()
cursor.execute("SELECT product, price, diagonal, resolution, cpu, ram, graphics_controller, volume, src FROM laptops")
fetched = cursor.fetchall()
return fetched
cursor.close()
connection.close()
print(getcont2())