Skip to content

Commit 2c59529

Browse files
committed
use renewal template if applicable
1 parent 35792e4 commit 2c59529

File tree

3 files changed

+135
-10
lines changed

3 files changed

+135
-10
lines changed

sponsors/contracts.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,16 @@ def _contract_context(contract, **context):
3333
"legal_clauses": _clean_split(contract.legal_clauses.raw),
3434
}
3535
)
36+
previous_effective = contract.sponsorship.previous_effective_date
37+
context["previous_effective"] = previous_effective if previous_effective else "UNKNOWN"
38+
context["previous_effective_english_suffix"] = format(previous_effective, "S") if previous_effective else "UNKNOWN"
3639
return context
3740

3841

3942
def render_markdown_from_template(contract, **context):
4043
template = "sponsors/admin/contracts/sponsorship-agreement.md"
44+
if contract.sponsorship.renewal:
45+
template = "sponsors/admin/contracts/renewal-agreement.md"
4146
context = _contract_context(contract, **context)
4247
return render_to_string(template, context)
4348

@@ -66,7 +71,7 @@ def render_contract_to_docx_response(request, contract, **context):
6671
)
6772
response[
6873
"Content-Disposition"
69-
] = f"attachment; filename=sponsorship-contract-{contract.sponsorship.sponsor.name.replace(' ', '-')}.docx"
74+
] = f"attachment; filename={'sponsorship-renewal' if contract.sponsorship.renewal else 'sponsorship-contract'}-{contract.sponsorship.sponsor.name.replace(' ', '-')}.docx"
7075
return response
7176

7277

sponsors/tests/test_contracts.py

+14-9
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,28 @@
1212
class TestRenderContract(TestCase):
1313
def setUp(self):
1414
self.contract = baker.make_recipe("sponsors.tests.empty_contract", sponsorship__start_date=date.today())
15-
self.context = {
16-
"contract": self.contract,
17-
"start_date": self.contract.sponsorship.start_date,
18-
"start_day_english_suffix": format(self.contract.sponsorship.start_date, "S"),
19-
"sponsor": self.contract.sponsorship.sponsor,
20-
"sponsorship": self.contract.sponsorship,
21-
"benefits": [],
22-
"legal_clauses": [],
23-
}
2415

2516
# DOCX unit test
2617
def test_render_response_with_docx_attachment(self):
2718
request = Mock(HttpRequest)
19+
self.contract.sponsorship.renewal = False
2820
response = render_contract_to_docx_response(request, self.contract)
2921

3022
self.assertEqual(response.get("Content-Disposition"), "attachment; filename=sponsorship-contract-Sponsor.docx")
3123
self.assertEqual(
3224
response.get("Content-Type"),
3325
"application/vnd.openxmlformats-officedocument.wordprocessingml.document"
3426
)
27+
28+
29+
# DOCX unit test
30+
def test_render_renewal_response_with_docx_attachment(self):
31+
request = Mock(HttpRequest)
32+
self.contract.sponsorship.renewal = True
33+
response = render_contract_to_docx_response(request, self.contract)
34+
35+
self.assertEqual(response.get("Content-Disposition"), "attachment; filename=sponsorship-renewal-Sponsor.docx")
36+
self.assertEqual(
37+
response.get("Content-Type"),
38+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document"
39+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
---
2+
title: SPONSORSHIP AGREEMENT RENEWAL
3+
geometry:
4+
- margin=1.25in
5+
font-size: 12pt
6+
pagestyle: empty
7+
---
8+
9+
**THIS SPONSORSHIP AGREEMENT RENEWAL** (the **"Agreement"**)
10+
is entered into and made effective as of the
11+
{{start_date|date:"j"}}{{start_day_english_suffix}} of {{start_date|date:"F Y"}}
12+
(the **"Effective Date"**),
13+
by and between the **Python Software Foundation** (the **"PSF"**),
14+
a Delaware nonprofit corporation,
15+
and **{{sponsor.name|upper}}** (**"Sponsor"**),
16+
a {{sponsor.state}} corporation.
17+
Each of the PSF and Sponsor are hereinafter sometimes individually
18+
referred to as a **"Party"** and collectively as the **"Parties"**.
19+
20+
## RECITALS
21+
22+
**WHEREAS**, the PSF is a tax-exempt charitable organization (EIN 04-3594598)
23+
whose mission is to promote, protect, and advance the Python programming language,
24+
and to support and facilitate the growth of a diverse
25+
and international community of Python programmers (the **"Programs"**);
26+
27+
**WHEREAS**, Sponsor and the PSF previously entered into a Sponsorship Agreement
28+
with the effective date of the
29+
{{ previous_effective|date:"j" }}{{ previous_effective_english_suffix }} of {{ previous_effective|date:"F Y" }}
30+
and a term of one year (the “Sponsorship Agreement”).
31+
32+
**WHEREAS**, Sponsor wishes to renew its support the Programs by making a contribution to the PSF.
33+
34+
## AGREEMENT
35+
36+
**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 to extend and amend the Sponsorship Agreement as follows:
37+
38+
1. [**Replacement of the Exhibit**]{.underline} Exhibit A to the Sponsorship Agreement is replaced with Exhibit A below.
39+
40+
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.
41+
42+
 
43+
44+
45+
### \[Signature Page Follows\]
46+
47+
::: {.page-break}
48+
\newpage
49+
:::
50+
51+
## SPONSORSHIP AGREEMENT RENEWAL
52+
53+
**IN WITNESS WHEREOF**, the Parties hereto have duly executed this **Sponsorship Agreement Renewal** as of the **Effective Date**.
54+
55+
 
56+
57+
**PSF**:
58+
**PYTHON SOFTWARE FOUNDATION**,
59+
a Delaware non profit corporation
60+
61+
 
62+
63+
By:        ________________________________
64+
Name:   Loren Crary
65+
Title:     Director of Resource Development
66+
67+
 
68+
69+
 
70+
71+
**SPONSOR**:
72+
**{{sponsor.name|upper}}**,
73+
a {{sponsor.state}} entity
74+
75+
 
76+
77+
By:        ________________________________
78+
Name:   ________________________________
79+
Title:     ________________________________
80+
81+
::: {.page-break}
82+
\newpage
83+
:::
84+
85+
## SPONSORSHIP AGREEMENT RENEWAL
86+
87+
### EXHIBIT A
88+
89+
1. [**Sponsorship**]{.underline} During the Term of this Agreement, in return for the Sponsorship Payment, the PSF agrees to identify and acknowledge Sponsor as a {{sponsorship.year}} {{sponsorship.level_name}} Sponsor of the Programs and of the PSF, in accordance with the United States Internal Revenue Service guidance applicable to qualified sponsorship payments.
90+
91+
Acknowledgments of appreciation for the Sponsorship Payment may identify and briefly describe Sponsor and its products or product lines in neutral terms and may include Sponsor’s name, logo, well-established slogan, locations, telephone numbers, or website addresses, but such acknowledgments shall not include (a) comparative or qualitative descriptions of Sponsor’s products, services, or facilities; (b) price information or other indications of savings or value associated with Sponsor’s products or services; (c) a call to action; (d) an endorsement; or (e) an inducement to buy, sell, or use Sponsor’s products or services. Any such acknowledgments will be created, or subject to prior review and approval, by the PSF.
92+
93+
The PSF’s acknowledgment may include the following:
94+
95+
- [**Display of Logo**]{.underline} The PSF will display Sponsor’s logo and other agreed-upon identifying information on www.python.org, and on any marketing and promotional media made by the PSF in connection with the Programs, solely for the purpose of acknowledging Sponsor as a sponsor of the Programs in a manner (placement, form, content, etc.) reasonably determined by the PSF in its sole discretion. Sponsor agrees to provide all the necessary content and materials for use in connection with such display.
96+
97+
- Additional acknowledgment as provided in Sponsor Benefits.
98+
99+
1. [**Sponsorship Payment**]{.underline} The amount of Sponsorship Payment shall be {{sponsorship.verbose_sponsorship_fee|title}} USD ($ {{sponsorship.sponsorship_fee}}). The Sponsorship Payment is due within thirty (30) days of the Effective Date. To the extent that any portion of a payment under this section would not (if made as a Separate payment) be deemed a qualified sponsorship payment under IRC § 513(i), such portion shall be deemed and treated as separate from the qualified sponsorship payment.
100+
101+
1. [**Receipt of Payment**]{.underline} Sponsor must submit full payment in order to secure Sponsor Benefits.
102+
103+
1. [**Refunds**]{.underline} The PSF does not offer refunds for sponsorships. The PSF may cancel the event(s) or any part thereof. In that event, the PSF shall determine and refund to Sponsor the proportionate share of the balance of the aggregate Sponsorship fees applicable to event(s) received which remain after deducting all expenses incurred by the PSF.
104+
105+
1. [**Sponsor Benefits**]{.underline} Sponsor Benefits per the Agreement are:
106+
107+
1. Acknowledgement as described under "Sponsorship" above.
108+
109+
{%for benefit in benefits%} 1. {{benefit}}
110+
{%endfor%}
111+
112+
{%if legal_clauses%}1. Legal Clauses. Related legal clauses are:
113+
114+
{%for clause in legal_clauses%} 1. {{clause}}
115+
{%endfor%}{%endif%}

0 commit comments

Comments
 (0)