debugs the previous commit <.<

This commit is contained in:
Michael Beck 2025-04-11 15:57:01 +02:00
parent 60cc378f05
commit 0e4f79c885
11 changed files with 20 additions and 20 deletions

View File

@ -6,14 +6,14 @@ bp = Blueprint("main", __name__)
@bp.route("/")
def index():
return render_template("index.html.jina")
return render_template("index.html.jinja")
@bp.route("/logs")
def logs():
return render_template("logs.html.jina", app_title="PaperScraper")
return render_template("logs.html.jinja", app_title="PaperScraper")
@bp.route("/about")
def about():
return render_template("about.html.jina", app_title="PaperScraper")
return render_template("about.html.jinja", app_title="PaperScraper")

View File

@ -72,7 +72,7 @@ def list_papers():
status_counts = {status: count for status, count in status_counts}
return render_template(
"papers.html.jina",
"papers.html.jinja",
papers=pagination.items,
pagination=pagination,
total_papers=total_papers,
@ -137,4 +137,4 @@ def export_papers():
@bp.route("/<int:paper_id>/detail")
def paper_detail(paper_id):
paper = PaperMetadata.query.get_or_404(paper_id)
return render_template("partials/paper_detail_modal.html.jina", paper=paper)
return render_template("partials/paper_detail_modal.html.jinja", paper=paper)

View File

@ -72,7 +72,7 @@ def schedule():
}
volume = VolumeConfig.query.first()
return render_template(
"schedule.html.jina",
"schedule.html.jinja",
schedule=schedule,
volume=volume.volume if volume else 0,
app_title="PaperScraper",

View File

@ -32,19 +32,19 @@ def upload():
duplicate_strategy = request.form.get("duplicate_strategy", "skip")
if not file:
return render_template("upload.html.jina", error="No file selected.")
return render_template("upload.html.jinja", error="No file selected.")
try:
stream = codecs.iterdecode(file.stream, "utf-8")
content = "".join(stream)
df = pd.read_csv(StringIO(content), delimiter=delimiter)
except Exception as e:
return render_template("upload.html.jina", error=f"Failed to read CSV file: {e}")
return render_template("upload.html.jinja", error=f"Failed to read CSV file: {e}")
missing = REQUIRED_COLUMNS - set(df.columns)
if missing:
return render_template(
"upload.html.jina", error=f"Missing required columns: {', '.join(missing)}"
"upload.html.jinja", error=f"Missing required columns: {', '.join(missing)}"
)
# Optional: parse 'published_online' to date
@ -126,7 +126,7 @@ def upload():
except Exception as e:
db.session.rollback()
return render_template(
"upload.html.jina", error=f"Failed to save data to database: {e}"
"upload.html.jinja", error=f"Failed to save data to database: {e}"
)
# Prepare error samples for display
@ -145,13 +145,13 @@ def upload():
session["error_data"] = error_csv.getvalue()
return render_template(
"upload.html.jina",
"upload.html.jinja",
success=f"File processed! Added: {added_count}, Updated: {updated_count}, Skipped: {skipped_count}, Errors: {error_count}",
error_message=error_message,
error_samples=error_samples
)
return render_template("upload.html.jina")
return render_template("upload.html.jinja")
@bp.route("/download_error_log")

View File

@ -1,4 +1,4 @@
{% extends "base.html" %} {% block content %}
{% extends "base.html.jinja" %} {% block content %}
<h1 class="mb-4">📘 About This App</h1>
<p class="lead">

View File

@ -13,9 +13,9 @@
</head>
<body>
{% include "nav.html" %}
{% include "nav.html.jinja" %}
<main class="container my-5">{% block content %}{% endblock content %}</main>
{% include "footer.html" %}
{% include "footer.html.jinja" %}
</body>
</html>

View File

@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "base.html.jinja" %}
{% block content %}
<div class="container text-center">

View File

@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "base.html.jinja" %}
{% block content %}
<h1>Activity Logs</h1>

View File

@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "base.html.jinja" %}
{% block title %}Papers{% endblock title %}
{% block content %}

View File

@ -1,4 +1,4 @@
{% extends "base.html" %} {% block content %}
{% extends "base.html.jinja" %} {% block content %}
<style>
.timeline {
display: flex;

View File

@ -1,4 +1,4 @@
{% extends "base.html" %} {% block content %}
{% extends "base.html.jinja" %} {% block content %}
<h1>Welcome to SciPaperLoader</h1>
{% if success %}