Skip to content

Commit f3b1141

Browse files
committed
consolidate templates
1 parent e193216 commit f3b1141

File tree

3 files changed

+22
-127
lines changed

3 files changed

+22
-127
lines changed

sponsors/contracts.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def _contract_context(contract, **context):
3131
"sponsorship": contract.sponsorship,
3232
"benefits": _clean_split(contract.benefits_list.raw),
3333
"legal_clauses": _clean_split(contract.legal_clauses.raw),
34+
"renewal": True if contract.sponsorship.renewal else False,
3435
}
3536
)
3637
previous_effective = contract.sponsorship.previous_effective_date
@@ -41,8 +42,6 @@ def _contract_context(contract, **context):
4142

4243
def render_markdown_from_template(contract, **context):
4344
template = "sponsors/admin/contracts/sponsorship-agreement.md"
44-
if contract.sponsorship.renewal:
45-
template = "sponsors/admin/contracts/renewal-agreement.md"
4645
context = _contract_context(contract, **context)
4746
return render_to_string(template, context)
4847

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

-119
This file was deleted.

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

+21-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{% load humanize %}
22
---
3-
title: SPONSORSHIP AGREEMENT
3+
title: SPONSORSHIP AGREEMENT{% if renewal %} RENEWAL{% endif %}
44
geometry:
55
- margin=1.25in
66
font-size: 12pt
@@ -9,7 +9,7 @@ header-includes:
99
- \pagenumbering{gobble}
1010
---
1111

12-
**THIS SPONSORSHIP AGREEMENT** (the **"Agreement"**)
12+
**THIS SPONSORSHIP AGREEMENT{% if renewal %} RENEWAL{% endif %}** (the **"Agreement"**)
1313
is entered into and made effective as of the
1414
{{start_date|date:"j"}}{{start_day_english_suffix}} of {{start_date|date:"F Y"}}
1515
(the **"Effective Date"**),
@@ -29,12 +29,26 @@ and international community of Python programmers (the **"Programs"**);
2929

3030
**WHEREAS**, Sponsor is {{contract.sponsor_info}}; and
3131

32-
**WHEREAS**, Sponsor wishes to support the Programs by making a contribution to the PSF.
32+
**WHEREAS**, Sponsor {% if renewal %}
33+
and the PSF previously entered into a Sponsorship Agreement
34+
with the effective date of the
35+
{{ previous_effective|date:"j" }}{{ previous_effective_english_suffix }} of {{ previous_effective|date:"F Y" }}
36+
37+
**WHEREAS**, Sponsor wishes to renew its support the Programs by making a contribution to the PSF.
38+
and a term of one year (the “Sponsorship Agreement”).
39+
{% else %}
40+
wishes to support the Programs by making a contribution to the PSF.
41+
{% endif %}
3342

3443
## AGREEMENT
3544

3645
**NOW, THEREFORE**, in consideration of the foregoing and the mutual covenants contained herein, and for other good and valuable consideration, the receipt and sufficiency of which are hereby acknowledged, the Parties hereto agree as follows:
3746

47+
{% if renewal %}
48+
1. [**Replacement of the Exhibit**]{.underline} Exhibit A to the Sponsorship Agreement is replaced with Exhibit A below.
49+
50+
1. [**Renewal**]{.underline} Approval and incorporation of this new exhibit with the previous Sponsor Benefits shall be considered written notice by Sponsor to the PSF that you wish to continue the terms of the Sponsorship Agreement for an additional year and to contribute the new Sponsorship Payment specified in Exhibit A, beginning on the Effective Date, as contemplated by Section 6 of the Sponsorship Agreement.
51+
{% else %}
3852
1. [**Recitals Incorporated**]{.underline}. Each of the above Recitals is incorporated into and is made a part of this Agreement.
3953

4054
1. [**Exhibits Incorporated by Reference**]{.underline}. All exhibits referenced in this Agreement are incorporated herein as integral parts of this Agreement and shall be considered reiterated herein as fully as if such provisions had been set forth verbatim in this Agreement.
@@ -134,6 +148,7 @@ and international community of Python programmers (the **"Programs"**);
134148

135149
1. [**Entire Agreement**]{.underline}. This Agreement (including the Exhibits) sets forth the entire agreement of the Parties and supersedes all prior oral or written agreements or understandings between the Parties as to the subject matter of this Agreement. Except as otherwise expressly provided herein, neither Party is relying upon any warranties, representations, assurances, or inducements of the other Party.
136150

151+
{% endif %}
137152
 
138153

139154

@@ -143,9 +158,9 @@ and international community of Python programmers (the **"Programs"**);
143158
\newpage
144159
:::
145160

146-
## SPONSORSHIP AGREEMENT
161+
## SPONSORSHIP AGREEMENT{% if renewal %} RENEWAL{% endif %}
147162

148-
**IN WITNESS WHEREOF**, the Parties hereto have duly executed this **Sponsorship Agreement** as of the **Effective Date**.
163+
**IN WITNESS WHEREOF**, the Parties hereto have duly executed this **Sponsorship Agreement{% if renewal %} Renewal{% endif %}** as of the **Effective Date**.
149164

150165
 
151166

@@ -177,7 +192,7 @@ and international community of Python programmers (the **"Programs"**);
177192
\newpage
178193
:::
179194

180-
## SPONSORSHIP AGREEMENT
195+
## SPONSORSHIP AGREEMENT{% if renewal %} RENEWAL{% endif %}
181196

182197
### EXHIBIT A
183198

0 commit comments

Comments
 (0)