Try using underscores in variable names.
Makes for pretty ugly latex, but looks better on the frontend.
This commit is contained in:
parent
2acac101f1
commit
8d269c8ed3
|
@ -113,7 +113,7 @@ input, textarea {
|
||||||
dl {
|
dl {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
#closingtext {
|
#closing_text {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,11 +40,11 @@
|
||||||
<dl>
|
<dl>
|
||||||
{{ render_field(form.username) }}
|
{{ render_field(form.username) }}
|
||||||
{{ render_field(form.company) }}
|
{{ render_field(form.company) }}
|
||||||
{{ render_field(form.jobandpronoun) }}
|
{{ render_field(form.job_and_pronoun) }}
|
||||||
{{ render_field(form.skilltypes) }}
|
{{ render_field(form.skill_types) }}
|
||||||
{{ render_field(form.myskills) }}
|
{{ render_field(form.my_skills) }}
|
||||||
{{ render_field(form.body, 'class=bigtext') }}
|
{{ render_field(form.body, 'class=bigtext') }}
|
||||||
{{ render_field(form.closingtext) }}
|
{{ render_field(form.closing_text) }}
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
{% if errors %}
|
{% if errors %}
|
||||||
|
|
16
latty.py
16
latty.py
|
@ -28,20 +28,20 @@ base_tex_text = open(proj_dir + "/writing_templates/base.tex", "r").read()
|
||||||
class CLData:
|
class CLData:
|
||||||
username: str
|
username: str
|
||||||
company: str
|
company: str
|
||||||
jobandpronoun: str
|
job_and_pronoun: str
|
||||||
skilltypes: str
|
skill_types: str
|
||||||
myskills: str
|
my_skills: str
|
||||||
closingtext: str
|
closing_text: str
|
||||||
body: str
|
body: str
|
||||||
|
|
||||||
def get_pairs(self):
|
def get_pairs(self):
|
||||||
return [
|
return [
|
||||||
("username", self.username),
|
("username", self.username),
|
||||||
("company", self.company),
|
("company", self.company),
|
||||||
("jobandpronoun", self.jobandpronoun),
|
("job_and_pronoun", self.job_and_pronoun),
|
||||||
("skilltypes", self.skilltypes),
|
("skill_types", self.skill_types),
|
||||||
("myskills", self.myskills),
|
("my_skills", self.my_skills),
|
||||||
("closingtext", self.closingtext),
|
("closing_text", self.closing_text),
|
||||||
("body", self.body),
|
("body", self.body),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
23
writing.py
23
writing.py
|
@ -26,22 +26,23 @@ class CLForm(Form):
|
||||||
[validators.Length(min=2, max=99)],
|
[validators.Length(min=2, max=99)],
|
||||||
default="BananaCorp"
|
default="BananaCorp"
|
||||||
)
|
)
|
||||||
jobandpronoun = StringField(
|
job_and_pronoun = StringField(
|
||||||
'Job and Pronoun (a/an):',
|
'Job and Pronoun (a/an):',
|
||||||
[validators.Length(min=4, max=99)],
|
[validators.Length(min=4, max=99)],
|
||||||
default="a banana stocker"
|
default="a banana stocker"
|
||||||
)
|
)
|
||||||
skilltypes = StringField(
|
skill_types = StringField(
|
||||||
'Skill Type:',
|
'Skill Type:',
|
||||||
[validators.Length(min=2, max=99)],
|
[validators.Length(min=2, max=99)],
|
||||||
default="practical"
|
default="practical"
|
||||||
)
|
)
|
||||||
myskills = StringField(
|
my_skills = StringField(
|
||||||
'My Skills:',
|
'My Skills:',
|
||||||
[validators.Length(min=2, max=99)],
|
[validators.Length(min=2, max=99)],
|
||||||
default="stocking bananas"
|
default="stocking bananas"
|
||||||
)
|
)
|
||||||
closingtext = TextAreaField(
|
|
||||||
|
closing_text = TextAreaField(
|
||||||
'Closing Text:',
|
'Closing Text:',
|
||||||
[validators.Length(min=2, max=99)],
|
[validators.Length(min=2, max=99)],
|
||||||
default="I look forward to hearing from you"
|
default="I look forward to hearing from you"
|
||||||
|
@ -52,8 +53,8 @@ class CLForm(Form):
|
||||||
[validators.Length(min=4, max=9999)],
|
[validators.Length(min=4, max=9999)],
|
||||||
default=(
|
default=(
|
||||||
"My name is {\\username}. I'm excited for the opportunity to work as "
|
"My name is {\\username}. I'm excited for the opportunity to work as "
|
||||||
"{\\jobandpronoun} with your company. I think my {\\skilltypes} knowledge "
|
"{\\job_and_pronoun} with your company. I think my {\\skill_types} knowledge "
|
||||||
"of {\\myskills} can contribute a lot to your team.\n\n"
|
"of {\\my_skills} can contribute a lot to your team.\n\n"
|
||||||
|
|
||||||
"I am passionate about what I do, and I think we would work well together.\n\n"
|
"I am passionate about what I do, and I think we would work well together.\n\n"
|
||||||
|
|
||||||
|
@ -73,7 +74,7 @@ def index_get():
|
||||||
|
|
||||||
|
|
||||||
@writing_blueprint.route('/dbtest', methods=['GET'])
|
@writing_blueprint.route('/dbtest', methods=['GET'])
|
||||||
def dbtest_get():
|
def db_test_get():
|
||||||
response = make_response(db.get_user_letters(1)[0].contents, 200)
|
response = make_response(db.get_user_letters(1)[0].contents, 200)
|
||||||
response.mimetype = "text/plain"
|
response.mimetype = "text/plain"
|
||||||
return response
|
return response
|
||||||
|
@ -105,10 +106,10 @@ def index_post():
|
||||||
data = CLData(
|
data = CLData(
|
||||||
username=form.username.data,
|
username=form.username.data,
|
||||||
company=form.company.data,
|
company=form.company.data,
|
||||||
jobandpronoun=form.jobandpronoun.data,
|
job_and_pronoun=form.job_and_pronoun.data,
|
||||||
skilltypes=form.skilltypes.data,
|
skill_types=form.skill_types.data,
|
||||||
myskills=form.myskills.data,
|
my_skills=form.my_skills.data,
|
||||||
closingtext=form.closingtext.data,
|
closing_text=form.closing_text.data,
|
||||||
body=form.body.data,
|
body=form.body.data,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
\body
|
\body
|
||||||
|
|
||||||
\closing{\closingtext,}
|
\closing{\closing\_text,}
|
||||||
|
|
||||||
\end{letter}
|
\end{letter}
|
||||||
\end{document}
|
\end{document}
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
|
|
||||||
\def \thecompany {BananCorp}
|
\def \thecompany {BananCorp}
|
||||||
\def \jobandpronoun {PusherBoy }
|
\def \job\_and\_pronoun {PusherBoy }
|
||||||
\def \skilltypes {broad, practical }
|
\def \skill\_types {broad, practical }
|
||||||
\def \myskills {software design principles}
|
\def \my\_skills {software design principles}
|
||||||
% CoverLetter.tex - Create a cover letter using an included vars.tex
|
% CoverLetter.tex - Create a cover letter using an included vars.tex
|
||||||
|
|
||||||
% \def \username {Sage Vaillancourt}
|
% \def \username {Sage Vaillancourt}
|
||||||
% \def \thecompany {Travelers}
|
% \def \thecompany {Travelers}
|
||||||
% \def \jobandpronoun {a Software Engineer }
|
% \def \job\_and\_pronoun {a Software Engineer }
|
||||||
% \def \skilltypes {broad, practical }
|
% \def \skill\_types {broad, practical }
|
||||||
% \def \myskills {computer systems}
|
% \def \my\_skills {computer systems}
|
||||||
|
|
||||||
\include{vars}
|
\include{vars}
|
||||||
|
|
||||||
|
@ -23,8 +23,8 @@
|
||||||
\opening{Dear \thecompany,}
|
\opening{Dear \thecompany,}
|
||||||
|
|
||||||
My name is Sage Vaillancourt. I'm excited for the opportunity to work as
|
My name is Sage Vaillancourt. I'm excited for the opportunity to work as
|
||||||
\jobandpronoun with your company. It's clear that you're looking for a hard worker who
|
\job\_and\_pronoun with your company. It's clear that you're looking for a hard worker who
|
||||||
has a \skilltypes knowledge of \myskills, so I'm certain that I'd be a
|
has a \skill\_types knowledge of \my\_skills, so I'm certain that I'd be a
|
||||||
perfect fit to work with you.
|
perfect fit to work with you.
|
||||||
|
|
||||||
I am someone who has been passionate about computers my whole life, and I have
|
I am someone who has been passionate about computers my whole life, and I have
|
||||||
|
|
Loading…
Reference in New Issue