diff options
| author | jwansek <eddie.atten.ea29@gmail.com> | 2023-01-25 16:56:29 +0000 | 
|---|---|---|
| committer | jwansek <eddie.atten.ea29@gmail.com> | 2023-01-25 16:56:29 +0000 | 
| commit | c9c6db89a10e331d3df9f1a60b5c3ea89b1e7c59 (patch) | |
| tree | abb16b2853f843b8f62050bc673a2e31afd94567 /database.py | |
| parent | e0580829876fb40855c2500135127c9970ba7769 (diff) | |
| download | boymoder.blog-c9c6db89a10e331d3df9f1a60b5c3ea89b1e7c59.tar.gz boymoder.blog-c9c6db89a10e331d3df9f1a60b5c3ea89b1e7c59.zip | |
Added yaoi on sidebar
Diffstat (limited to 'database.py')
| -rwxr-xr-x | database.py | 9 | 
1 files changed, 8 insertions, 1 deletions
| diff --git a/database.py b/database.py index 272e39e..cf51922 100755 --- a/database.py +++ b/database.py @@ -55,6 +55,11 @@ class Database:              cursor.execute("SELECT alt, url FROM images WHERE pfp_img = 1;")              return cursor.fetchall() +    def get_sidebar_images(self): +        with self.__connection.cursor() as cursor: +            cursor.execute("SELECT alt, url FROM images WHERE sidebar_image = 1;") +            return cursor.fetchall() +      def get_header_articles(self):          with self.__connection.cursor() as cursor:              cursor.execute("SELECT articleName, link FROM headerArticles;") @@ -350,5 +355,7 @@ def request_recent_commits(since = datetime.datetime.now() - datetime.timedelta(  if __name__ == "__main__": +    import app      with Database() as db: -        print(db.fetch_diary()) +        print(app.get_sidebar_img(db)) +        # print(db.get_sidebar_images()) | 
