Skip to content

Commit eaf59c1

Browse files
author
Kátia Nakamura
committed
speaker: remove fake data and add related presentation info
1 parent 568556e commit eaf59c1

File tree

4 files changed

+24
-44
lines changed

4 files changed

+24
-44
lines changed

pyconbalkan/core/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def home(request):
2727
'partners': partners,
2828
'count_down': count_down.first() if count_down else None,
2929
'mission_statement': mission_statement.first() if mission_statement else None,
30-
#'meta': conference.first().as_meta(),
30+
'meta': conference.first().as_meta(),
3131
}
3232
return render(request, 'home.html', context)
3333

pyconbalkan/speaker/templates/speaker.html

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,16 @@
1111

1212
<div class="speaker__details">
1313
<h1>
14+
{% if speaker.keynote %}<i class="fas fa-star"></i>{% endif %}
1415
{{ speaker.name }}
1516
{% if speaker.country %}<i class="flag em em-flag-{{ speaker.country.code|lower }}"></i>{% endif %}
1617
</h1>
18+
19+
<h2><i class="fas fa-laptop-code"></i> {{ speaker.job }} - {{ speaker.company }}</h2>
20+
<p class="speaker__description title--white">
21+
{{ speaker.description|safe }}
22+
</p>
23+
1724
<div class="social__links">
1825
{% if speaker.personal_website %}
1926
<a href="{{ speaker.personal_website }}" class="website" target="_ blank"></a>
@@ -31,26 +38,13 @@ <h1>
3138
<a href="{{ speaker.facebook }}" class="facebook" target="_ blank"></a>
3239
{% endif %}
3340
</div>
34-
<h2><i class="fas fa-laptop-code"></i> {{ speaker.job }} - {{ speaker.company }}</h2>
35-
<p class="speaker__description title--white">
36-
{{ speaker.description|safe }}
37-
</p>
38-
39-
<!-- Fake text - Details of the talk needed here from schedule model -->
40-
<h2><i class="fas fa-bullhorn"></i> Title of the talk: "Great benefits of learning Python language in 2018"</h2>
41-
<p class="speaker__description title--white">
42-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras porttitor sit amet erat vitae venenatis.
43-
Sed pretium leo non enim rhoncus, vel blandit dolor convallis. In non arcu accumsan ligula sagittis pellentesque.
44-
In dignissim metus eu efficitur gravida. Vestibulum placerat a quam sed tincidunt.
45-
Aliquam vestibulum velit ac lacus iaculis imperdiet. Mauris vel quam dui.
46-
Nulla ut scelerisque arcu, sit amet imperdiet nulla.
47-
</p>
48-
<ul style="margin-left: 20px">
49-
<li>Vestibulum placerat a quam sed tincidunt.</li>
50-
<li>Nulla ut scelerisque arcu, sit amet imperdiet nulla.</li>
51-
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
52-
</ul>
5341

42+
{% for presentation in speaker.presentation.all %}
43+
<h2><i class="fas fa-bullhorn"></i> {{ presentation.title }}</h2>
44+
<p class="speaker__description title--white">
45+
{{ presentation.description|safe }}
46+
</p>
47+
{% endfor %}
5448
</div>
5549
</div>
5650

pyconbalkan/speaker/templates/speakers.html

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
{# Speakers #}
66

7-
<h1 class="centered">Speakers at PyCon Balkan, Belgrade 2018</h1>
7+
<h1 class="centered">Speakers</h1>
88
<hr class="line line__centered">
99

1010
{% if speakers %}
@@ -18,34 +18,20 @@ <h1 class="centered">Speakers at PyCon Balkan, Belgrade 2018</h1>
1818
</div>
1919
<div class="speaker__details">
2020
<a href="{% url 'speaker_detail' slug=speaker.slug %}"><h1>
21+
{% if speaker.keynote %}<i class="fas fa-star"></i>{% endif %}
2122
{{ speaker.name }}
2223
{% if speaker.country %}
2324
<i class="flag em em-flag-{{ speaker.country.code|lower }}"></i>
2425
{% endif %}
2526
, <span class="title-white"> {{ speaker.job }} - {{ speaker.company }}</span>
2627
</h1></a>
27-
<h2>Tittle of the talk: "Somethin about python programming language"</h2>
28-
<br>
29-
<a class="button button--yellow" href="{% url 'speaker_detail' slug=speaker.slug %}" role="button">
30-
View more
31-
</a>
32-
<!--<div class="social__links">
33-
{% if speaker.personal_website %}
34-
<a href="{{ speaker.personal_website }}" class="website" target="_ blank"></a>
35-
{% endif %}
36-
{% if speaker.github %}
37-
<a href="{{ speaker.github }}" class="github" target="_ blank"></a>
38-
{% endif %}
39-
{% if speaker.linkedin %}
40-
<a href="{{ speaker.linkedin }}" class="linkedin" target="_ blank"></a>
41-
{% endif %}
42-
{% if speaker.twitter %}
43-
<a href="{{ speaker.twitter }}" class="twitter" target="_ blank"></a>
44-
{% endif %}
45-
{% if speaker.facebook %}
46-
<a href="{{ speaker.facebook }}" class="facebook" target="_ blank"></a>
47-
{% endif %}
48-
</div>-->
28+
{% for presentation in speaker.presentation.all %}
29+
<h2>{{ presentation.title }}</h2>
30+
<br>
31+
<a class="button button--yellow" href="{% url 'speaker_detail' slug=speaker.slug %}" role="button">
32+
View more
33+
</a>
34+
{% endfor %}
4935
</div>
5036
</div>
5137
<hr class="line long">

pyconbalkan/speaker/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def speaker_detail(request, slug):
1919

2020

2121
def speaker_list(request):
22-
speakers = Speaker.objects.filter(keynote=False, active=True)
22+
speakers = Speaker.objects.filter(active=True).prefetch_related('presentation')
2323
context = {
2424
'speakers': speakers,
2525
}

0 commit comments

Comments
 (0)