Skip to content

Commit 894440c

Browse files
committed
make it pretty
1 parent ef04c34 commit 894440c

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

sponsors/contracts.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
dirname = os.path.dirname(__file__)
1111
DOCXPAGEBREAK_FILTER = os.path.join(dirname, "pandoc_filters/pagebreak.py")
12+
REFERENCE_DOCX = os.path.join(dirname, "reference.docx")
1213

1314

1415
def _clean_split(text, separator="\n"):
@@ -70,7 +71,6 @@ def render_contract_to_docx_response(request, contract, **context):
7071

7172

7273
def render_contract_to_docx_file(contract, **context):
73-
reference = "sponsors/admin/contracts/reference.docx"
7474
markdown = render_markdown_from_template(contract, **context)
7575
with tempfile.NamedTemporaryFile() as docx_file:
7676
docx = pypandoc.convert_text(
@@ -79,5 +79,6 @@ def render_contract_to_docx_file(contract, **context):
7979
outputfile=docx_file.name,
8080
format="md",
8181
filters=[DOCXPAGEBREAK_FILTER],
82+
extra_args=[f"--reference-doc", REFERENCE_DOCX],
8283
)
8384
return docx_file.read()

sponsors/reference.docx

11.5 KB
Binary file not shown.
-9.99 KB
Binary file not shown.

templates/sponsors/admin/contracts/sponsorship-agreement.md

+10-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
# SPONSORSHIP AGREEMENT
1+
---
2+
title: SPONSORSHIP AGREEMENT
3+
geometry:
4+
- margin=1.25in
5+
font-size: 12pt
6+
pagestyle: empty
7+
---
28

39
**THIS SPONSORSHIP AGREEMENT** (the **"Agreement"**)
410
is entered into and made effective as of the
@@ -120,9 +126,7 @@ and to support and facilitate the growth of a diverse and international communit
120126
 
121127

122128

123-
::: {.center}
124-
**[Signature Page Follows]**
125-
:::
129+
### \[Signature Page Follows\]
126130

127131
::: {.page-break}
128132
\newpage
@@ -140,7 +144,7 @@ a Delaware non profit corporation
140144

141145
 
142146

143-
By:         ________________________________
147+
By:        ________________________________
144148
Name:   Loren Crary
145149
Title:     Director of Resource Development
146150

@@ -154,7 +158,7 @@ a {{sponsor.state}} entity
154158

155159
 
156160

157-
By:         ________________________________
161+
By:        ________________________________
158162
Name:   ________________________________
159163
Title:     ________________________________
160164

0 commit comments

Comments
 (0)