🚚 move out comics data

This commit is contained in:
mi
2025-11-06 21:32:40 +10:00
parent b8a75571a5
commit 0d229fd442
2 changed files with 30 additions and 28 deletions

29
app.py
View File

@@ -1,38 +1,11 @@
from flask import Flask, render_template, abort
from comics_data import COMICS
app = Flask(__name__)
# Configuration
app.config['SECRET_KEY'] = 'your-secret-key-here' # Change this in production
# Sample comic data (in production, this would come from a database)
COMICS = [
{
'number': 1,
'title': 'First Comic',
'filename': 'comic-001.png',
'date': '2025-01-01',
'alt_text': 'The very first comic',
'transcript': 'This is where your comic journey begins!'
},
{
'number': 2,
'title': 'Second Comic',
'filename': 'comic-002.png',
'date': '2025-01-08',
'alt_text': 'The second comic',
'transcript': 'The adventure continues...'
},
{
'number': 3,
'title': 'Third Comic',
'filename': 'comic-003.png',
'date': '2025-01-15',
'alt_text': 'The third comic',
'transcript': 'Things are getting interesting!'
},
]
def get_comic_by_number(number):
"""Get a comic by its number"""