Files
PromptTech/backend/update_about_content.py

20 lines
732 B
Python
Raw Permalink Normal View History

#!/usr/bin/env python3
import psycopg2
conn = psycopg2.connect(
host='localhost',
database='prompttech',
user='prompttech_user',
password='prompttech_pass'
)
cur = conn.cursor()
new_content = "Founded in 2021, PromptTech Solutions has evolved from a small repair shop into a comprehensive tech solutions provider. We're here to guide you through any technology challenge—whether it's laptops, desktops, smartphones, or other devices. With expert service and personalized support, we deliver reliable solutions for all your tech needs."
cur.execute("UPDATE about_content SET content = %s WHERE section = 'hero'", (new_content,))
conn.commit()
print(f'Updated {cur.rowcount} row(s)')
cur.close()
conn.close()