-
Notifications
You must be signed in to change notification settings - Fork 285
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #871 from amakarudze/partners
Add sponsors page, make sponsor urls open on blank page
- Loading branch information
Showing
12 changed files
with
171 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
globalpartners/migrations/0003_globalpartner_description.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Generated by Django 3.2.18 on 2023-03-08 20:38 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("globalpartners", "0002_alter_globalpartner_sponsor_level_annual"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="globalpartner", | ||
name="description", | ||
field=models.TextField(blank=True, max_length=1000, null=True), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
{% extends 'global/base.html' %} | ||
{% load i18n static %} | ||
|
||
{% block content %} | ||
{% url 'contact:landing' as contact_url %} | ||
|
||
<div class="container"> | ||
<h1 class="text-center">{% trans "Our Global Partners" %}</h1> | ||
|
||
<div> | ||
{% blocktrans trimmed %} | ||
Our global partners are companies who are supporting our work by donating to us either monthly through | ||
<a href="https://www.patreon.com/djangogirls" target="_blank">Patreon</a> or through annual sponsorships. | ||
Want to join these amazing companies in sponsoring us? | ||
Our <a href="https://drive.google.com/file/d/1T2jL9tnu5ZkNvkQRAxd7jlt_BnX7VCLE/view?usp=sharing">corporate sponsorships</a> | ||
start at 100 USD per month. <a href="{{ contact_url }}">Contact us!</a> 📨 | ||
{% endblocktrans %} | ||
</div> | ||
|
||
{% if diamond %} | ||
<h2 class="text-center">{% trans "Diamond - $10,000+ per year 💞✨" %}</h2> | ||
|
||
{% for sponsor in diamond %} | ||
<div class="row"> | ||
<div class="col-md-9"> | ||
<a href="{{ sponsor.website_url }}" target="_blank"><h4>{{ sponsor.company_name }}</h4></a> | ||
{% if sponsor.description %} | ||
<p>{{ sponsor.description| safe }}</p> | ||
{% endif %} | ||
</div> | ||
<div class="col-md-3"> | ||
<a href="{{ sponsor.website_url }}" target="_blank"><img src="{{ sponsor.logo.url }}" alt="{{ sponsor.company_name }}"></a> | ||
</div> | ||
</div> | ||
{% endfor %} | ||
{% endif %} | ||
|
||
{% if platinum %} | ||
<h2 class="text-center">{% trans "Platinum - $5,000+ per year 💝✨" %}</h2> | ||
|
||
{% for sponsor in platinum %} | ||
<div class="row"> | ||
<div class="col-md-9"> | ||
<a href="{{ sponsor.website_url }}" target="_blank"><h4>{{ sponsor.company_name }}</h4></a> | ||
{% if sponsor.description %} | ||
<p>{{ sponsor.description| safe }}</p> | ||
{% endif %} | ||
</div> | ||
<div class="col-md-3"> | ||
<a href="{{ sponsor.website_url }}" target="_blank"><img src="{{ sponsor.logo.url }}" alt="{{ sponsor.company_name }}"></a> | ||
</div> | ||
</div> | ||
{% endfor %} | ||
{% endif %} | ||
|
||
{% if gold %} | ||
<h2 class="text-center">{% trans "Gold - $2,500+ per year 💖✨" %}</h2> | ||
|
||
{% for sponsor in gold %} | ||
<div class="row"> | ||
<div class="col-md-9"> | ||
<a href="{{ sponsor.website_url }}" target="_blank"><h4>{{ sponsor.company_name }}</h4></a> | ||
{% if sponsor.description %} | ||
<p>{{ sponsor.description| safe }}</p> | ||
{% endif %} | ||
</div> | ||
<div class="col-md-3"> | ||
<a href="{{ sponsor.website_url }}" target="_blank"><img src="{{ sponsor.logo.url }}" alt="{{ sponsor.company_name }}"></a> | ||
</div> | ||
</div> | ||
{% endfor %} | ||
{% endif %} | ||
|
||
{% if silver %} | ||
<h2 class="text-center">{% trans "Silver - $1,000+ per year 💗✨" %}</h2> | ||
|
||
{% for sponsor in sliver %} | ||
<div class="row"> | ||
<div class="col-md-9"> | ||
<a href="{{ sponsor.website_url }}" target="_blank"><h4>{{ sponsor.company_name }}</h4></a> | ||
{% if sponsor.description %} | ||
<p>{{ sponsor.description| safe }}</p> | ||
{% endif %} | ||
</div> | ||
<div class="col-md-3"> | ||
<a href="{{ sponsor.website_url }}" target="_blank"><img src="{{ sponsor.logo.url }}" alt="{{ sponsor.company_name }}"></a> | ||
</div> | ||
</div> | ||
{% endfor %} | ||
{% endif %} | ||
|
||
{% if bronze %} | ||
<div class="row"> | ||
<div class="col-md-4"></div> | ||
<div class="col-md-4"><h2>{% block trans %}Bronze - $500+ per year 💓✨{% endblock %}</h2></div> | ||
<div class="col-md-4"></div> | ||
</div> | ||
|
||
{% for sponsor in bronze %} | ||
<div class="row"> | ||
<div class="col-md-9"> | ||
<a href="{{ sponsor.website_url }}" target="_blank"><h4>{{ sponsor.company_name }}</h4></a> | ||
{% if sponsor.description %} | ||
<p>{{ sponsor.description| safe }}</p> | ||
{% endif %} | ||
</div> | ||
<div class="col-md-3"> | ||
<a href="{{ sponsor.website_url }}" target="_blank"><img src="{{ sponsor.logo.url }}" alt="{{ sponsor.company_name }}"></a> | ||
</div> | ||
</div> | ||
{% endfor %} | ||
{% endif %} | ||
|
||
</div> | ||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,6 @@ | |
from globalpartners.models import GlobalPartner | ||
from pictures.models import StockPicture | ||
from sponsor.models import Donor | ||
|
||
from tests.mocks import * # noqa | ||
|
||
|
||
|
@@ -17,7 +16,6 @@ def default_mocks(slack_mock): | |
""" | ||
Add mocks that should be accessible for all tests in this function signature. | ||
""" | ||
pass | ||
|
||
|
||
@pytest.fixture(autouse=True) | ||
|
@@ -283,12 +281,22 @@ def remote_story(): | |
@pytest.fixture | ||
def globalpartner(db): | ||
return GlobalPartner.objects.create( | ||
company_name="Django", contact_person="Jane Doe", contact_email="[email protected]", logo="django.png" | ||
company_name="Django Software Foundation", | ||
contact_person="Jane Doe", | ||
contact_email="[email protected]", | ||
logo="django.png", | ||
is_displayed=True, | ||
sponsor_level_annual=5000, | ||
) | ||
|
||
|
||
@pytest.fixture | ||
def globalpartner2(db): | ||
return GlobalPartner.objects.create( | ||
company_name="Caktus Group", contact_person="Jane Doe", contact_email="[email protected]", logo="caktus.png" | ||
company_name="Caktus Group", | ||
contact_person="Jane Doe", | ||
contact_email="[email protected]", | ||
logo="caktus.png", | ||
is_displayed=True, | ||
sponsor_level_annual=2500, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters