Verified Commit c9995018 authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Add local partner to partners page

parent 0e38b50a
......@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-06-07 14:29+0200\n"
"PO-Revision-Date: 2019-06-07 15:04+0200\n"
"POT-Creation-Date: 2019-06-20 16:40+0200\n"
"PO-Revision-Date: 2019-06-20 16:41+0200\n"
"Last-Translator: Sébastiaan Versteeg <>\n"
"Language-Team: \n"
"Language: nl\n"
......@@ -16,7 +16,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 2.2.1\n"
"X-Generator: Poedit 2.2.3\n"
#: templates/partners/index.html templates/partners/partner.html
msgid "Partners"
......@@ -128,14 +128,18 @@ msgstr ""
#: templates/partners/index.html
msgid "Main Partner"
msgstr "Hoofdpartner"
msgid "our main partner"
msgstr "onze hoofdpartner"
#: templates/partners/index.html templates/partners/partner.html
#: templates/partners/vacancies.html templates/partners/vacancy_card.html
msgid "Learn more"
msgstr "Lees meer"
#: templates/partners/index.html
msgid "our local partner"
msgstr "onze localpartner"
#: templates/partners/partner.html
msgid "Address"
msgstr "Adres"
......@@ -21,16 +21,32 @@
<div class="row mt-4">
<div class="col-12 col-md-4 d-flex align-items-center">
<div class="col-12 col-md-6">
<div class="text-center">
<img src="{% thumbnail main_partner.logo THUMBNAIL_SIZE_MEDIUM fit=False %}"/>
<div class="col-12 col-md-8 mt-3 mt-md-0">
<h2>{% trans "Main Partner" %}</h2>
<div class="mt-3">
<h2>{% trans "our main partner"|capfirst %}</h2>
<h3>{{ }}</h3>
<p>{{ main_partner.company_profile|striptags|bleach|truncatechars:425 }}</p>
<a href="{{ main_partner.get_absolute_url }}" class="btn btn-secondary">{% trans "Learn more" %}</a>
<a href="{{ main_partner.get_absolute_url }}" class="btn btn-primary">{% trans "Learn more" %}</a>
<div class="col-12 col-md-6">
<div class="text-center">
<img src="{% thumbnail local_partner.logo THUMBNAIL_SIZE_MEDIUM fit=False %}"/>
<div class="mt-3">
<h2>{% trans "our local partner"|capfirst %}</h2>
<h3>{{ }}</h3>
<p>{{ local_partner.company_profile|striptags|bleach|truncatechars:425 }}</p>
<a href="{{ local_partner.get_absolute_url }}" class="btn btn-primary">{% trans "Learn more" %}</a>
<div class="row mt-4">
<div class="row mt-4">
{% for partner in partners %}
......@@ -8,17 +8,17 @@ from partners.models import Partner, Vacancy, VacancyCategory
def index(request):
"""View to show overview page of partners."""
partners = Partner.objects.filter(is_active=True, is_main_partner=False)
main_partner = Partner.objects.get(
partners = Partner.objects.filter(
except Partner.DoesNotExist:
main_partner = None
main_partner = Partner.objects.filter(is_main_partner=True).first()
local_partner = Partner.objects.filter(is_local_partner=True).first()
context = {
'main_partner': main_partner,
'local_partner': local_partner,
'partners': sorted(partners, key=lambda x: random()),
return render(request, 'partners/index.html', context)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment