From 83e8701698bbb19adc0443ddccd93cecb2bd30cd Mon Sep 17 00:00:00 2001 From: paulmwatson Date: Wed, 14 Aug 2024 12:53:46 +0200 Subject: [PATCH 01/11] Fix broken CRON --- app.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.json b/app.json index 1540dab3..166d4b2c 100644 --- a/app.json +++ b/app.json @@ -1,8 +1,8 @@ { "cron": [ { - "command": "curl api.pmg.org.za/v2/bill-tracker/update/ > /var/log/cron-bill-tracker", - "schedule": "0 1 * * *" + "command": "curl https://api.pmg.org.za/v2/bill-tracker/update/", + "schedule": "@daily" } ] } \ No newline at end of file From a707b94a3f6bb204b5c9e26e86949c607ee43c19 Mon Sep 17 00:00:00 2001 From: paulmwatson Date: Wed, 14 Aug 2024 12:55:03 +0200 Subject: [PATCH 02/11] Add Bill Tracker update request to post-deploy task so transient file is re-generated --- app.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app.json b/app.json index 166d4b2c..3c1107db 100644 --- a/app.json +++ b/app.json @@ -4,5 +4,8 @@ "command": "curl https://api.pmg.org.za/v2/bill-tracker/update/", "schedule": "@daily" } - ] + ], + "scripts": { + "postdeploy": "curl https://api.pmg.org.za/v2/bill-tracker/update/" + } } \ No newline at end of file From f3c8839986cc9348c9d19440244c976ed17d60fa Mon Sep 17 00:00:00 2001 From: paulmwatson Date: Wed, 14 Aug 2024 13:07:00 +0200 Subject: [PATCH 03/11] Basic postdeploy script did not work. Trying dokku.postdeploy script. --- app.json | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app.json b/app.json index 3c1107db..fa2e0de1 100644 --- a/app.json +++ b/app.json @@ -1,11 +1,13 @@ { + "scripts": { + "dokku": { + "postdeploy": "curl https://api.pmg.org.za/v2/bill-tracker/update/" + } + }, "cron": [ { "command": "curl https://api.pmg.org.za/v2/bill-tracker/update/", "schedule": "@daily" } - ], - "scripts": { - "postdeploy": "curl https://api.pmg.org.za/v2/bill-tracker/update/" - } + ] } \ No newline at end of file From 69520457b73ec22ee4d140cd299c6a094a52722c Mon Sep 17 00:00:00 2001 From: paulmwatson Date: Wed, 14 Aug 2024 23:26:28 +0200 Subject: [PATCH 04/11] Fallbacks for old event committee meetings without linked committee --- pmg/templates/committee_layout.html | 17 ++++++++++++++--- pmg/templates/committee_meeting.html | 6 +++++- pmg/views.py | 8 ++++++-- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/pmg/templates/committee_layout.html b/pmg/templates/committee_layout.html index c0a60738..5832559b 100644 --- a/pmg/templates/committee_layout.html +++ b/pmg/templates/committee_layout.html @@ -1,16 +1,25 @@ {% extends "base.html" %} -{% block title %}{{ committee.name }} | PMG{% endblock %} +{% block title %} + {% if committee %} + {{ committee.name }} | + {% endif %} + PMG +{% endblock %} {% block breadcrumb %}