Skip to content

Commit 635b30d

Browse files
moacirmodarenzon
authored andcommitted
creating treinamento devpro`s webinar page
1 parent 0186a62 commit 635b30d

File tree

5 files changed

+224
-1
lines changed

5 files changed

+224
-1
lines changed

pythonpro/pages/templates/pages/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ <h2 class='mt-5 mb-5 font-weight-bold'><u>CONHEÇA SEU PROFESSOR!</u></h2>
9797
}
9898
.img-renzo {
9999
max-width: 400px;
100-
margin-top: -80px;
100+
margin-top: -10px;
101101
margin-bottom: -100px;
102102
}
103103
.container {
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
{% extends 'pages/base.html' %}
2+
{% load bootstrap4 %}
3+
{% load static %}
4+
5+
{% block title %}MASTERCLASS RUMO A PRIMEIRA VAGA! Inscreva-se Grátis!{% endblock %}
6+
{% block description %}{% endblock %}
7+
8+
{% block content %}
9+
<div class='bg-black'>
10+
<div class="container">
11+
<div class="row text-center text-light">
12+
<div class="col hero">
13+
<h1 class='font-weight-bold'>
14+
<u>RUMO A PRIMEIRA VAGA!</u>
15+
</h1>
16+
17+
<h3 class='font-weight-bold mb-4'>
18+
O caminho mais rápido para você conquistar sua primeira oportunidade
19+
como programador e iniciar uma carreira à prova de crise.
20+
</h3>
21+
22+
<h4 class='' id="topo">
23+
Workshop Online e Gratuito.
24+
</h4>
25+
26+
<h4 class=''>
27+
<b class='text-uppercase'>Dia 07/10 às 21h, Horário de Brasília</b>
28+
</h4>
29+
</div>
30+
</div>
31+
32+
<div class="row">
33+
<div class='offset-md-2 col-md-8 col-sm-12 text-light'>
34+
35+
<span class=' font-weight-bold' style='font-size: 16pt'>Preencha o formulário:</span>
36+
<form method="POST" class='mb-5 text-center'>
37+
{% csrf_token %}
38+
{% bootstrap_form form %}
39+
40+
<button type='submit' class='btn btn-warning text-center cta'>
41+
<b>CONFIRMAR MINHA INSCRIÇÃO!</b>
42+
</button>
43+
</form>
44+
</div>
45+
</div>
46+
</div>
47+
</div>
48+
49+
<div class='mt-5 mb-5 content'>
50+
<div class="container">
51+
<div class="row">
52+
<div class="col">
53+
<h2 class='font-weight-bold text-center mb-5 text-uppercase'>
54+
O que você vai aprender nesta aula?
55+
</h2>
56+
</div>
57+
</div>
58+
59+
<div class="row">
60+
<div class="col text-center">
61+
<span class="ec ec-bulb"></span>
62+
<p><h3 class='font-weight-bold'>Princípio de Pareto</h3></p>
63+
<p>Faça apenas o mínimo, necessário e suficiente</p>
64+
</div>
65+
66+
<div class="col text-center">
67+
<span class="ec ec-muscle"></span>
68+
<p><h3 class='font-weight-bold'>Testar o Mercado</h3></p>
69+
<p>Se candidate para todas as vagas em aberto</p>
70+
</div>
71+
72+
<div class="col text-center">
73+
<span class="ec ec-money-mouth-face"></span>
74+
<p><h3 class='font-weight-bold'>Vender p/ não ser Vendido</h3></p>
75+
<p>Aprenda como se vender nos processos seletivos</p>
76+
</div>
77+
78+
</div>
79+
</div>
80+
</div>
81+
{% endblock content %}
82+
83+
{% block footer %}
84+
<div class=''>
85+
<div class="container">
86+
<div class="row">
87+
<div class="col mt-5 mb-5 text-center">
88+
<i>
89+
{% now "Y" %} Python Pro. Todos os direitos reservados. <br>
90+
CNPJ: 31.080.715/0001-25<br>
91+
+55 84 99464-4699 - {{ DEFAULT_FROM_EMAIL }}
92+
</i>
93+
94+
</div>
95+
</div>
96+
</div>
97+
</div>
98+
99+
{% endblock %}
100+
101+
{% block styles %}
102+
{{ block.super }}
103+
<link rel='stylesheet' href='https://unpkg.com/emoji.css/dist/emoji.min.css'>
104+
105+
<style>
106+
.bg-black {
107+
background-color: #0c1b33 !important;
108+
}
109+
.content .ec {
110+
font-size: 100pt;
111+
}
112+
.content .col h3 {
113+
font-size: 17pt;
114+
margin: -20px 0;
115+
}
116+
117+
@media only screen and (min-device-width : 320px) and (max-device-width : 1024px) {
118+
.hero h1 {
119+
font-size: 20pt;
120+
}
121+
.hero h4 {
122+
font-size: 14pt;
123+
}
124+
.cta {
125+
font-size: 14pt !important;
126+
padding: 10px 20px;
127+
}
128+
h2 {
129+
font-size: 18pt;
130+
}
131+
p {
132+
font-size: 12pt;
133+
}
134+
}
135+
</style>
136+
137+
{% endblock %}
138+
139+
{% block scripts %}{% endblock %}
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
from unittest import mock
2+
3+
import pytest
4+
from django.urls import reverse
5+
6+
from pythonpro.django_assertions import dj_assert_contains
7+
8+
9+
@pytest.fixture
10+
def client(client, cohort):
11+
return client
12+
13+
14+
def test_should_return_200_when_load_invite_page(client):
15+
resp = client.get(reverse('pages:tpp_webiorico_landing_page'))
16+
assert resp.status_code == 200
17+
18+
19+
def test_should_return_200_when_load_thank_you_page(client):
20+
resp = client.get(reverse('pages:tpp_webiorico_thank_you_page'))
21+
assert resp.status_code == 200
22+
23+
24+
@pytest.fixture
25+
def create_or_update_with_no_role(mocker):
26+
return mocker.patch('pythonpro.email_marketing.facade.create_or_update_with_no_role.delay')
27+
28+
29+
# TODO: move this phone tests do generic context
30+
def test_should_call_update_when_with_correct_parameters(create_or_update_with_no_role, client):
31+
client.post(
32+
reverse('pages:tpp_webiorico_landing_page'),
33+
{'name': 'Moacir', 'email': 'moacir@python.pro.br'},
34+
secure=True
35+
)
36+
37+
create_or_update_with_no_role.assert_called_with('Moacir', 'moacir@python.pro.br', mock.ANY)
38+
39+
40+
# TODO: move this phone tests do generic context
41+
def test_should_call_update_when_logged_with_correct_parameters(create_or_update_with_no_role, client_with_user):
42+
client_with_user.post(
43+
reverse('pages:tpp_webiorico_landing_page'),
44+
{'name': 'Moacir', 'email': 'moacir@python.pro.br'},
45+
secure=True
46+
)
47+
48+
create_or_update_with_no_role.assert_called_with('Moacir', 'moacir@python.pro.br', mock.ANY)
49+
50+
51+
def test_should_run_form_ok(create_or_update_with_no_role, client, cohort):
52+
resp = client.post(
53+
reverse('pages:tpp_webiorico_landing_page'),
54+
{'name': 'Moacir', 'email': 'moacir@python.pro.br'},
55+
secure=True
56+
)
57+
58+
assert resp.status_code == 302
59+
60+
61+
def test_should_inform_form_error(create_or_update_with_no_role, client, cohort):
62+
resp = client.post(
63+
reverse('pages:tpp_webiorico_landing_page'),
64+
{'name': 'Moacir', 'email': 'moacirpython.pro.br'},
65+
secure=True
66+
)
67+
68+
assert resp.status_code == 200
69+
dj_assert_contains(resp, 'is-invalid')

pythonpro/pages/urls.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,14 @@
4040
views.BootcampVipThankYouPage.as_view(),
4141
name='bootcamp_vip_thank_you_page'
4242
),
43+
path(
44+
'rumo-a-primeira-vaga/inscricao',
45+
views.TppWebioricoLandingPage.as_view(),
46+
name='tpp_webiorico_landing_page'
47+
),
48+
path(
49+
'rumo-a-primeira-vaga/obrigado',
50+
views.DsWebinarThankYouPage.as_view(),
51+
name='tpp_webiorico_thank_you_page'
52+
),
4353
]

pythonpro/pages/views.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,8 @@ def get_email_marketing_tag(self):
8585

8686
class BootcampVipThankYouPage(BaseThankYouView):
8787
pass
88+
89+
90+
class TppWebioricoLandingPage(BaseLandingPageView):
91+
success_url = reverse_lazy('pages:ds_webinar_thank_you_page')
92+
email_marketing_tag = 'tpp-webiorico'

0 commit comments

Comments
 (0)