-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Criado app aperitivos para vídeos promocionais via vimeo
close #62
- Loading branch information
1 parent
8983398
commit 10b9b0e
Showing
9 changed files
with
110 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
Empty file.
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,72 @@ | ||
{% load static %} | ||
<!DOCTYPE html> | ||
<html lang="pt-br"> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
|
||
<title>Python Pro</title> | ||
|
||
<meta name="description" content="Página do curso Python Pro"> | ||
<meta name="author" content="Thiago Garcia"> | ||
<link rel="icon" type="image/png" href="{% static 'img/favicon.png' %}" /> | ||
|
||
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet"> | ||
<link href="{% static 'css/style.css' %}" rel="stylesheet"> | ||
<script src="{% static 'js/jquery.min.js' %}"></script> | ||
<script src="{% static 'js/bootstrap.min.js' %}"></script> | ||
<script src="{% static 'js/scripts.js' %}"></script> | ||
|
||
</head> | ||
|
||
<body> | ||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark"> | ||
<a class="navbar-brand" href="{% url 'base:home' %}">Python Pro</a> | ||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" | ||
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> | ||
<span class="navbar-toggler-icon"></span> | ||
</button> | ||
|
||
<div class="collapse navbar-collapse" id="navbarSupportedContent"> | ||
<ul class="navbar-nav mr-auto"> | ||
</ul> | ||
</div> | ||
</nav> | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-md-12"> | ||
<h1 class="mt-4 mb-3">Vídeo Aperitivo: Motivação</h1> | ||
<iframe src="https://player.vimeo.com/video/288344114?h=63fff44243&title=0&byline=0&portrait=0" | ||
width="640" height="360" frameborder="0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen> | ||
</iframe> | ||
</div> | ||
</div> | ||
</div> | ||
<footer class="main-footer mt-5 pt-4 text-light"> | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col"> | ||
<h3>Entre em contato</h3> | ||
<address> | ||
+55 00 12345-6789 | ||
<br /> | ||
<a href="mailto:[email protected]" class="text-light">[email protected]</a> | ||
</address> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="rights pb-4"> | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col"> | ||
{% now "Y" %} Python Pro. Todos os direitos reservados | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</footer> | ||
</body> | ||
|
||
</html> |
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,22 @@ | ||
from django.urls import reverse | ||
import pytest | ||
|
||
from pypro.django_assertions import assert_contains | ||
|
||
|
||
@pytest.fixture | ||
def resp(client): | ||
return client.get(reverse('aperitivos:video', args=('motivacao',))) | ||
|
||
|
||
def test_status_code(resp): | ||
assert resp.status_code == 200 | ||
|
||
|
||
def test_titulo_video(resp): | ||
assert_contains(resp, '<h1 class="mt-4 mb-3">Vídeo Aperitivo: Motivação</h1>') | ||
|
||
|
||
def test_conteudo_video(resp): | ||
assert_contains(resp, | ||
'<iframe src="https://player.vimeo.com/video/288344114?h=63fff44243&title=0&byline=0&portrait=0"') |
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,8 @@ | ||
from django.urls import path | ||
|
||
from pypro.aperitivos.views import video | ||
|
||
app_name = 'aperitivos' | ||
urlpatterns = [ | ||
path('<slug:slug>', video, name='video'), | ||
] |
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,5 @@ | ||
from django.shortcuts import render | ||
|
||
|
||
def video(request, slug): | ||
return render(request, 'aperitivos/video.html') |
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 |
---|---|---|
|
@@ -45,6 +45,7 @@ | |
'collectfast', | ||
'django.contrib.staticfiles', | ||
'pypro.base', | ||
'pypro.aperitivos', | ||
] | ||
|
||
MIDDLEWARE = [ | ||
|
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
[pytest] | ||
DJANGO_SETTINGS_MODULE = pypro.settings | ||
python_files = tests.py test_*.py *_tests.py |