Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions pythonpro/core/templates/core/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<script type="application/javascript" src="{% static 'js/bootstrap.bundle.min.js' %}"></script>
<link href='//fonts.googleapis.com/css?family=Ubuntu:400,500' rel='stylesheet' type='text/css'/>
</head>
<body >
<body>
<nav class="navbar navbar-dark bg-dark navbar-expand-md">
<a class="navbar-brand" href="/">Python Pro</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
Expand Down Expand Up @@ -63,8 +63,10 @@
<a class="nav-link" href="{{ DISCOURSE_BASE_URL }}">Fórum</a>
</li>
{% endif %}
<li class="nav-item">
<a class="nav-link" href="{% url 'core:tech_talks' %}">Tech Talks</a>
</li>
</ul>

{% if user.is_authenticated %}
<ul class="navbar-nav ">
<li class="nav-item dropdown">
Expand All @@ -73,7 +75,6 @@
aria-haspopup="true" aria-expanded="false">
{{ user.first_name }}
</a>

<div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" href="{% url 'core:profile' %}">Perfil</a>
<div class="dropdown-divider"></div>
Expand Down
19 changes: 19 additions & 0 deletions pythonpro/core/templates/core/tech_talks.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{% extends 'core/base.html' %}
{% load static %}
{% block body %}
<div class="container mt-5">
<div class="row">
<div class="col">
<h1 class="mb-3">Tech Talks Python Pro</h1>
<p class="mb-0">Tech Talks são encontros períodicos em que tratamos temas trazidos pelos alunos. Abaixo você encontra toda a lista de vídeos já gravados.<br/>
<a href="https://www.youtube.com/watch?v=bo3wH14JzQQ&index=1&list=PLA05yVJtRWYSQ0loqX4Er6wIwJ_sU8j3S" target="_blank">Inscreva-se no canal</a> para ser avisado dos novos vídeos e lives!
</p>
<div class="embed-container mt-3 border rounded">
<iframe src="https://www.youtube.com/embed/videoseries?list=PLA05yVJtRWYSQ0loqX4Er6wIwJ_sU8j3S" width="640" height="360"
frameborder="0"
webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
</div>
</div>
</div>
</div>
{% endblock body %}
18 changes: 18 additions & 0 deletions pythonpro/core/tests/test_view_tech_talks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import pytest
from django.urls import reverse

from pythonpro.django_assertions import dj_assert_contains


@pytest.fixture
def resp(client):
return client.get(reverse('core:tech_talks'), secure=True)


def test_status_code(resp):
assert 200 == resp.status_code


def test_link_on_home(client):
resp = client.get('/', secure=True)
dj_assert_contains(resp, reverse('core:tech_talks'))
1 change: 1 addition & 0 deletions pythonpro/core/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
app_name = 'core'
urlpatterns = [
path('', views.index, name='index'),
path('tech-talks', views.teck_talks, name='tech_talks'),
path('obrigado', views.thanks, name='thanks'),
path('perfil', views.profile, name='profile'),
path('perfil/nome', views.profile_name, name='profile_name'),
Expand Down
4 changes: 4 additions & 0 deletions pythonpro/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ def thanks(request):
return render(request, 'core/lead_thanks.html', {})


def teck_talks(request):
return render(request, 'core/tech_talks.html', {})


@login_required
def profile(request):
return render(request, 'core/profile_detail.html', {})
Expand Down