This commit is contained in:
iOnTuMuCTi
2023-05-23 01:01:46 +03:00
parent 3647eca03b
commit 18e6122296
289 changed files with 46932 additions and 0 deletions
@@ -0,0 +1,28 @@
import psycopg2
def getcont():
connection = psycopg2.connect(host='localhost', dbname='dbdata', user='postgres', password='Q1w2e3r4')
cursor = connection.cursor()
cursor.execute('''SELECT * FROM public.parser''')
arr = list(cursor.fetchall())
res = ''
k = 0
while k != len(arr):
i = arr[k]
res = res + f'''<div class="col-xl-6 col-md-6 col-lg-6">
<div class="single_delicious d-flex align-items-center">
<div class="thumb">
<img src="/static/polls/pictures/{k}.jpg" alt="">
</div>
<div class="info">
<h3>{i[1]}</h3>
<p>Rate: {i[3]}</p>
<span>{i[2]}</span>
</div>
</div>
</div>'''
k += 1
cursor.close()
connection.close()
return res