diff --git a/flaskr/templates/_formhelpers.html b/flaskr/templates/_formhelpers.jinja2
similarity index 100%
rename from flaskr/templates/_formhelpers.html
rename to flaskr/templates/_formhelpers.jinja2
diff --git a/flaskr/templates/writing.html b/flaskr/templates/writing.jinja2
similarity index 91%
rename from flaskr/templates/writing.html
rename to flaskr/templates/writing.jinja2
index 7b6db52..1cd7737 100644
--- a/flaskr/templates/writing.html
+++ b/flaskr/templates/writing.jinja2
@@ -2,6 +2,7 @@
+ UnderCover
@@ -28,7 +29,7 @@
UnderCover
The secret cover letter generator
- {% from "_formhelpers.html" import render_field %}
+ {% from "_formhelpers.jinja2" import render_field %}
diff --git a/latty.py b/latty.py
index 408bfc1..e9e6366 100644
--- a/latty.py
+++ b/latty.py
@@ -25,7 +25,7 @@ base_tex_text = open(proj_dir + "/writing_templates/base.tex", "r").read()
@dataclass
-class CLData():
+class CLData:
username: str
company: str
jobandpronoun: str
@@ -55,7 +55,7 @@ class CLData():
f.write(base_tex_text)
f.close()
- output_arg="-jobname=outputs/" + unique_id + " " + unique_file
+ output_arg = "-jobname=outputs/" + unique_id + " " + unique_file
com = "pdflatex -halt-on-error " + output_arg
build_text = "[" + get_datetime() + "] Building for " + unique_id + " "
result = subprocess.run(
@@ -94,7 +94,7 @@ class CLData():
errors = list(map(str.strip, result.stdout.split("\n")))
del errors[:13]
del errors[-2:]
- return (None, errors)
+ return None, errors
def cleanup(unique):
diff --git a/start b/start
index dcda877..8f5cf27 100755
--- a/start
+++ b/start
@@ -2,14 +2,14 @@
SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
if ! test -f "$SCRIPT_DIR/.undercover_init_successful"; then
- if ! $SCRIPT_DIR/init; then
+ if ! "$SCRIPT_DIR/init"; then
exit 1
fi
fi
if ! pip3 -V | grep "$SCRIPT_DIR/.venv"; then
echo "Entering virtual environment..."
- source $SCRIPT_DIR/.venv/bin/activate
+ source "$SCRIPT_DIR/.venv/bin/activate"
fi
if [[ "$1" == "prod" ]]; then
diff --git a/writing.py b/writing.py
index 2b8c0d8..b1d6a1f 100644
--- a/writing.py
+++ b/writing.py
@@ -66,7 +66,7 @@ class CLForm(Form):
def index_get():
if flaskr.INDEX is None:
flaskr.INDEX = render_template(
- 'writing.html',
+ 'writing.jinja2',
form=CLForm()
)
return flaskr.INDEX
@@ -115,7 +115,7 @@ def index_post():
(resp, errors) = data.generate_pdf()
if errors:
resp = make_response(render_template(
- 'writing.html',
+ 'writing.jinja2',
form=form,
errors=errors,
))
@@ -125,6 +125,6 @@ def index_post():
return resp
return render_template(
- 'writing.html',
+ 'writing.jinja2',
form=form,
)