Files
kitoy b2dbe5c8c9 Work in blog section
- Arrange the rss feed
- The articles are listed in chronological order
- Test the doublon for new article
2026-10-31 01:27:49 +01:00

25 lines
579 B
Python

from flask import Flask
import sqlite3
import string
import time
app = Flask( 'pywallter' )
app.config.from_pyfile('config.py')
DATABASE = app.config['DATABASE']
DOSSIER_PERSO = app.config['DOSSIER_APP']
DATABASE = app.config['DATABASE']
def article_exist(title_id : str, author : str ) -> bool:
conn = sqlite3.connect(DATABASE)
cursor = conn.cursor()
cursor.execute("""SELECT title FROM Blog_posts WHERE title_id=? AND author=?""", (title_id, author))
article = cursor.fetchone()
if article != None:
return True
else:
return False