From a4292238582df6578c66e67c555d0b3486894f52 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Mon, 21 Jun 2021 21:44:58 +1000 Subject: [PATCH] Re #42 - custom title (#98) --- backend/__init__.py | 1 + backend/forms.py | 1 + backend/templates/edit.html | 3 +++ 3 files changed, 5 insertions(+) diff --git a/backend/__init__.py b/backend/__init__.py index ee11f2a4..220a1aa7 100644 --- a/backend/__init__.py +++ b/backend/__init__.py @@ -378,6 +378,7 @@ def changedetection_app(config=None, datastore_o=None): if request.method == 'POST' and form.validate(): update_obj = {'url': form.url.data.strip(), 'tag': form.tag.data.strip(), + 'title': form.title.data.strip(), 'headers': form.headers.data } diff --git a/backend/forms.py b/backend/forms.py index f0449200..615b834f 100644 --- a/backend/forms.py +++ b/backend/forms.py @@ -111,6 +111,7 @@ class watchForm(Form): minutes_between_check = html5.IntegerField('Maximum time in minutes until recheck', [validators.Optional(), validators.NumberRange(min=1)]) css_filter = StringField('CSS Filter') + title = StringField('Title') ignore_text = StringListField('Ignore Text', [ListRegex()]) notification_urls = StringListField('Notification URL List') diff --git a/backend/templates/edit.html b/backend/templates/edit.html index 9c600f9c..eb794a60 100644 --- a/backend/templates/edit.html +++ b/backend/templates/edit.html @@ -7,6 +7,9 @@
{{ render_field(form.url, placeholder="https://...", size=30, required=true) }}
+
+ {{ render_field(form.title, size=30) }} +
{{ render_field(form.tag, size=10) }}