Skip to content

Commit

Permalink
make it pretty
Browse files Browse the repository at this point in the history
  • Loading branch information
ewdurbin committed Dec 18, 2023
1 parent ef04c34 commit 894440c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
3 changes: 2 additions & 1 deletion sponsors/contracts.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

dirname = os.path.dirname(__file__)
DOCXPAGEBREAK_FILTER = os.path.join(dirname, "pandoc_filters/pagebreak.py")
REFERENCE_DOCX = os.path.join(dirname, "reference.docx")


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


def render_contract_to_docx_file(contract, **context):
reference = "sponsors/admin/contracts/reference.docx"
markdown = render_markdown_from_template(contract, **context)
with tempfile.NamedTemporaryFile() as docx_file:
docx = pypandoc.convert_text(
Expand All @@ -79,5 +79,6 @@ def render_contract_to_docx_file(contract, **context):
outputfile=docx_file.name,
format="md",
filters=[DOCXPAGEBREAK_FILTER],
extra_args=[f"--reference-doc", REFERENCE_DOCX],
)
return docx_file.read()
Binary file added sponsors/reference.docx
Binary file not shown.
Binary file removed templates/sponsors/admin/contracts/reference.docx
Binary file not shown.
16 changes: 10 additions & 6 deletions templates/sponsors/admin/contracts/sponsorship-agreement.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# SPONSORSHIP AGREEMENT
---
title: SPONSORSHIP AGREEMENT
geometry:
- margin=1.25in
font-size: 12pt
pagestyle: empty
---

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


::: {.center}
**[Signature Page Follows]**
:::
### \[Signature Page Follows\]

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

 

By:         ________________________________
By:        ________________________________
Name:   Loren Crary
Title:     Director of Resource Development

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

 

By:         ________________________________
By:        ________________________________
Name:   ________________________________
Title:     ________________________________

Expand Down

0 comments on commit 894440c

Please sign in to comment.