From c7cb8ece2eb8f7c711f5fce4c2f53b319011955d Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Thu, 2 Nov 2023 21:05:08 +0200 Subject: comments trying to understand.. --- core/forms.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'core/forms.py') diff --git a/core/forms.py b/core/forms.py index 23b80ce..ede7d9e 100644 --- a/core/forms.py +++ b/core/forms.py @@ -16,7 +16,13 @@ import re There are other, simpler, upload forms in view/uploads.py class-based forms are quicker to set up (for Django experts) but -are more difficult to maintain by non-Django experts. +are more difficult to maintain (or even begin to understand) by non-Django experts. + +Notes to self, as I try to work out what the hell is going on: + +Note that HTMLarea invokes a widget which sets a CSS class which calls javascript in +templates/html_editor_scripts_css.html - which imports jquery and codemirror directly, without +declaring it anywhere or locally installing it. (!) """ todo = """ @@ -88,12 +94,6 @@ class CaveForm(ModelForm): # Converting a PENDING cave to a real cave by saving this form print("EEE", cave_slug.replace("-PENDING-", "-")) return cave_slug.replace("-PENDING-", "-") - -# def clean_url(self): -# data = self.cleaned_data["url"] -# if not re.match("\d\d\d\d/.", data): -# raise ValidationError("URL must start with a four digit Kataster area.") -# return data def clean(self): -- cgit v1.2.3