Work in blog section
- Arrange the rss feed - The articles are listed in chronological order - Test the doublon for new article
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
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
|
||||
Reference in New Issue
Block a user