fix: use hardcoded href instead of {% url %} to avoid NoReverseMatch in templates

This commit is contained in:
ishenwei
2026-04-08 20:52:03 +08:00
parent 6bd99d043c
commit 1a1985a270
2 changed files with 5 additions and 7 deletions

View File

@@ -1,13 +1,12 @@
{% extends "admin/base.html" %}
{% load humanize %}
{% block title %}{{ title }} | OpenClaw Archive{% endblock %}
{% block content %}
<div class="p-3">
<div class="d-flex justify-content-between align-items-center mb-3">
<h1>📋 Daily Report: <span class="text-primary">{{ agent_name }}</span><span class="text-success">{{ target_date }}</span></h1>
<a href="{% url 'admin:openclaw_daily_reports' %}?agent={{ agent_name }}&start={{ target_date }}&end={{ target_date }}" class="btn btn-secondary">← Back to List</a>
<h1>Daily Report: <span class="text-primary">{{ agent_name }}</span><span class="text-success">{{ target_date }}</span></h1>
<a href="/admin/daily-reports/?agent={{ agent_name }}&start={{ target_date }}&end={{ target_date }}" class="btn btn-secondary">← Back to List</a>
</div>
{% for item in sessions %}
@@ -27,9 +26,9 @@
<table class="table table-bordered table-sm mb-0" style="font-size:12px; table-layout: fixed;">
<colgroup>
<col style="width:60px">
<col style="width:100px">
<col style="width:80px">
<col style="width:140px">
<col style="width:100px">
<col style="width:150px">
<col style="width:500px">
</colgroup>
<thead class="table-light">
@@ -83,7 +82,6 @@
<span class="text-muted"><em>(empty)</em></span>
{% endif %}
{# Tool calls for this message #}
{% with msg.tool_calls.all as tc_list %}
{% if tc_list %}
<div class="mt-2">

View File

@@ -56,7 +56,7 @@
<td>{{ group.session_count }}</td>
<td>{{ group.message_count }}</td>
<td>
<a href="{% url 'admin:openclaw_daily_report_detail' group.agent_name group.date_val.year group.date_val.month group.date_val.day %}"
<a href="/admin/daily-reports/{{ group.agent_name }}/{{ group.date_val.year }}-{{ group.date_val.month }}-{{ group.date_val.day }}/"
class="btn btn-sm btn-info">
View Report
</a>