summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2024-12-28 17:04:36 +0000
committerPhilip Sargent <philip.sargent@gmail.com>2024-12-28 17:04:36 +0000
commit4652d83b497a1b41d6ef4be5490f32cfa30ca33c (patch)
tree4aa22dc463817c848f77eacd0e4dea7275ca2e7b
parent8dbad16ece1ebbe4f65b56bbc26c7be526bbe328 (diff)
downloadtroggle-4652d83b497a1b41d6ef4be5490f32cfa30ca33c.tar.gz
troggle-4652d83b497a1b41d6ef4be5490f32cfa30ca33c.tar.bz2
troggle-4652d83b497a1b41d6ef4be5490f32cfa30ca33c.zip
Comments adjusted
-rw-r--r--core/utils.py4
-rw-r--r--core/views/survex.py6
-rw-r--r--templates/editcave.html2
3 files changed, 8 insertions, 4 deletions
diff --git a/core/utils.py b/core/utils.py
index 161a7f6..798e48f 100644
--- a/core/utils.py
+++ b/core/utils.py
@@ -263,7 +263,7 @@ def git_string(author_string):
def write_and_commit(files, message, editor=None):
"""Writes the content to the filepath and adds and commits the file to git. If this fails, a WriteAndCommitError is raised.
- These need refactoring
+ This needs refactoring to just write and then call only_commit()
"""
git = settings.GIT
commands = []
@@ -380,7 +380,7 @@ class WriteAndCommitError(Exception):
return f"WriteAndCommitError: {self.message}"
-def writetrogglefile(filepath, filecontent, commit_msg=None):
+def writetrogglefile(filepath, filecontent, commit_msg=None):
"""
REPLACE with call to write_and_commit + any necessary setup
used only by cave editor in
diff --git a/core/views/survex.py b/core/views/survex.py
index 56d447f..07eab38 100644
--- a/core/views/survex.py
+++ b/core/views/survex.py
@@ -145,6 +145,10 @@ class SvxForm(forms.Form):
"""Two-pane form, upper half is the raw survex file, lower half (with green background)
is the output : of running 'cavern' on the survex file, of running a 'difference', of
checking that there are no square brackets left.
+
+ This is not a ModelForm.
+ see https://docs.djangoproject.com/en/5.1/topics/forms/modelforms/
+
"""
dirname = forms.CharField(widget=forms.TextInput(attrs={"readonly": True}))
@@ -154,7 +158,7 @@ class SvxForm(forms.Form):
code = forms.CharField(widget=forms.Textarea(attrs={"cols": 140, "rows": 36}))
who_are_you = forms.CharField(
widget=forms.TextInput(
- attrs={"size": 100, "placeholder": "You are editing this page, who are you ? e.g. 'Animal <mta@gasthof.expo>'",
+ attrs={"size": 100, "placeholder": "You are editing this page, who are you ? e.g. 'Becka' or 'Animal <mta@gasthof.expo>'",
"style": "vertical-align: text-top;"}
)
)
diff --git a/templates/editcave.html b/templates/editcave.html
index 68a36af..47e2759 100644
--- a/templates/editcave.html
+++ b/templates/editcave.html
@@ -70,7 +70,7 @@ div > label {
}
</style>
<form action="" method="post">{% csrf_token %}
- {% if tabletype == 'table' %}<table>{% endif %}
+ {% if tabletype == 'table' %}<table>{% endif %} <!-- to work with Dj 5.1 and Dj 3.2 -->
{{ form }}
{% if tabletype == 'table' %}</table>{% endif %}
<p><input style="font-weight: bold; font-size: 200%; font-variant-caps: small-caps; margin-left: 40%;" type="submit" value="Submit" /></p>