Skip to content

Commit b222e09

Browse files
renzonrenzon
authored andcommitted
Changed lead subscription to use only name and email
close #1126
1 parent 7f56253 commit b222e09

File tree

17 files changed

+156
-170
lines changed

17 files changed

+156
-170
lines changed

Pipfile.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pythonpro/core/forms.py

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from django import forms
12
from django.contrib.auth.forms import UserCreationForm
23
from django.core.exceptions import ValidationError
34
from django.forms import CharField, ModelForm
@@ -27,4 +28,26 @@ def clean(self):
2728
class UserSignupForm(UserCreationForm):
2829
class Meta:
2930
model = User
30-
fields = ('first_name', 'email', 'password1', 'password2',)
31+
fields = ('first_name', 'email')
32+
33+
password1 = forms.CharField(
34+
label=_("Password"),
35+
strip=False,
36+
required=False,
37+
widget=forms.PasswordInput,
38+
39+
)
40+
password2 = forms.CharField(
41+
label=_("Password confirmation"),
42+
widget=forms.PasswordInput,
43+
strip=False,
44+
required=False,
45+
help_text=_("Enter the same password as before, for verification."),
46+
)
47+
48+
def save(self, commit=True):
49+
user = super().save(commit=False)
50+
user.set_unusable_password()
51+
if commit:
52+
user.save()
53+
return user

pythonpro/core/static/css/bootstrap.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pythonpro/core/static/css/custom.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pythonpro/core/static/css/default.css

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99
color: #9fd25f;
1010
}
1111

12+
.font-ubuntu-grey {
13+
font-family: 'Ubuntu', Arial, sans-serif;
14+
color: #999999;
15+
}
16+
1217
.pythonpro-subtitle {
1318
font-family: 'Ubuntu', Arial, sans-serif;
1419
font-size: 2em;
@@ -27,22 +32,22 @@
2732

2833
.pallet.color-1 {
2934
background-color: #15b3f1;
30-
height: 260px;
35+
height: 140px;
3136
}
3237

3338
.pallet.color-2 {
3439
background-color: #178eee;
35-
height: 230px;
40+
height: 110px;
3641
}
3742

3843
.pallet.color-3 {
3944
background-color: #ffcc29;
40-
height: 200px;
45+
height: 80px;
4146
}
4247

4348
.pallet.color-4 {
4449
background-color: #9fd25f;
45-
height: 170px;
50+
height: 50px;
4651
}
4752

4853
.main-footer {
@@ -53,16 +58,31 @@
5358
background-color: #82b641;
5459
}
5560

56-
.embed-container { position: relative; padding-bottom: 56.25%; overflow: hidden; max-width: 100%; height: auto; }
57-
.embed-container iframe, .embed-container object, .embed-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
61+
.embed-container {
62+
position: relative;
63+
padding-bottom: 56.25%;
64+
overflow: hidden;
65+
max-width: 100%;
66+
height: auto;
67+
}
68+
69+
.embed-container iframe, .embed-container object, .embed-container embed {
70+
position: absolute;
71+
top: 0;
72+
left: 0;
73+
width: 100%;
74+
height: 100%;
75+
}
5876

5977
@media only screen and (max-width: 480px) {
6078
.pythonpro-title {
6179
font-size: 3em;
6280
}
81+
6382
.pythonpro-subtitle {
6483
font-size: 1.3em;
6584
}
85+
6686
.mb-3 h3 {
6787
font-size: 1.5rem;
6888
}

pythonpro/core/templates/core/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
{% endblock navbar %}
103103
{% block body %}
104104
{% endblock body %}
105-
<footer class="main-footer mt-5 text-light">
105+
<footer class="main-footer text-light">
106106
<div class="container">
107107
<div class="row">
108108
<div class="col">
Lines changed: 47 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{% extends 'core/base.html' %}
22
{% load static %}
3-
{% block description %}Curso de programação presencial online na linguagem Python. Aulas práticas do básico ao avançado focadas na carreira de Tecnologia{% endblock %}
3+
{% block description %}Curso de programação presencial online na linguagem Python. Aulas práticas do básico ao avançado
4+
focadas na carreira de Tecnologia{% endblock %}
45
{% block body %}
56
<div class="colors-pallet d-none d-md-block">
67
<div class="color-1 pallet"></div>
@@ -11,79 +12,61 @@
1112
<div class="container">
1213
<div class="row">
1314
<div class="col">
14-
<h1 class="pythonpro-title mt-3"><span class="python">Python</span> Pro</h1>
15-
<h2 class="pythonpro-subtitle mb-4 mb-md-5">Python para Profissionais</h2>
15+
<h1 class="pythonpro-title mt-5"><span class="python">Python</span> Pro</h1>
16+
<h2 class="pythonpro-subtitle mb-4 mb-md-5">Curso Presencial Online Completo<br/> Focado 100%
17+
no mercado de Tecnologia!</h2>
1618
</div>
1719
</div>
18-
<div class="row">
19-
<div class="col">
20-
<h4 class="mb-4 mb-md-5 text-center">Curso Presencial Online Completo, focado 100% no mercado de Tecnologia!</h4>
20+
</div>
21+
{% if SUBSCRIPTIONS_OPEN %}
22+
<div class="bg-light">
23+
<div class="container pt-5 pb-5">
24+
<div class="row">
25+
<div class="col text-center">
26+
<h1 class="pb-3">Inscrições Abertas!</h1>
27+
<p>Aulas da turma começam em outubro. Garanta sua matrícula, vagas Limitadas!</p>
28+
<a class="btn btn-warning p-4 font-weight-bold" href="{% url 'payments:options' %}"
29+
role="button">Sim, quero participar da próxima turma! &raquo;</a>
30+
</div>
31+
</div>
32+
2133
</div>
2234
</div>
23-
24-
25-
{% if SUBSCRIPTIONS_OPEN %}
26-
<div class="row">
27-
<div class="col">
28-
<div class="jumbotron">
29-
<h1 class="display-4">Inscrições Abertas!</h1>
30-
<p class="lead">Inscrições abertas para turma que começa em março. Vagas Limitadas.</p>
31-
<a class="btn btn-primary btn-lg text-light p-4" href="{% url 'payments:options' %}"
32-
role="button">QUERO ME
33-
MATRICULAR &raquo;</a>
35+
{% endif %}
36+
<div class="bg-primary">
37+
<div class="container pt-5 pb-5">
38+
<div class="row mt-8">
39+
<div class="col-12 col-md mb-3">
40+
<div class="embed-container">
41+
<iframe src="https://player.vimeo.com/video/258681672" width="640" height="360" frameborder="0"
42+
webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
3443
</div>
3544
</div>
36-
</div>
37-
{% endif %}
38-
<div class="row mt-8">
39-
<div class="col-12 col-md mb-3">
40-
<div class="embed-container">
41-
<iframe src="https://player.vimeo.com/video/258681672" width="640" height="360" frameborder="0"
42-
webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
45+
<div class="col-12 col-md text-light">
46+
<h3 class="mb-3">Curso Python Birds Grátis</h3>
47+
<p>Cadastre seu email para ganhar um curso básico de Programação!</p>
48+
{% include 'core/lead_form.html' %}
4349
</div>
4450
</div>
45-
<div class="col-12 col-md">
46-
<h3 class="mb-3">Módulo Python Birds Grátis</h3>
47-
<p>Cadastre seu email para aprender o básico de Python e Orientação a Objetos implementando o jogo Angry
48-
Birds</p>
49-
50-
<form action="https://python.us17.list-manage.com/subscribe/post?u=ff7c56095f83f9c254edd749e&amp;id=e3072e0df0"
51-
method="post" name="mc-embedded-subscribe-form"
52-
target="_blank">
53-
<div class="form-group row">
54-
<label for="email-input" class="col-sm-2 col-form-label">Email</label>
55-
<div class="col-sm-10">
56-
<input type="email" name="EMAIL" class="form-control" id="email-input" placeholder="Email"
57-
required="required">
58-
</div>
59-
</div>
60-
<div class="form-group row">
61-
<label for="name-input" class="col-sm-2 col-form-label">Nome</label>
62-
<div class="col-sm-10">
63-
<input type="text" name="FNAME" class="form-control" id="name-input" placeholder="Nome">
64-
</div>
65-
</div>
66-
67-
<div style="position: absolute; left: -5000px;" aria-hidden="true">
68-
<input type="text"
69-
name="b_ff7c56095f83f9c254edd749e_e3072e0df0"
70-
tabindex="-1" value="">
71-
</div>
51+
</div>
52+
</div>
53+
<div class="container pt-5">
54+
{% include 'core/instructors.html' %}
55+
</div>
56+
<div class="bg-light">
57+
<div class="container pt-5 pb-5">
58+
{% include 'core/social_proof.html' %}
59+
</div>
60+
</div>
61+
<div class="bg-primary pt-5 pb-5 text-light">
62+
<div class="container">
63+
<div class="row">
64+
<div class="col-6">
65+
<h3>Quer se transformar também?</h3>
66+
{% include 'core/lead_form.html' with form=form %}
7267

73-
<input type="hidden" name="SUBSCRIP[day]" value="{% now "d" %}">
74-
<input type="hidden" name="SUBSCRIP[month]" value="{% now "m" %}">
75-
<input type="hidden" name="SUBSCRIP[year]" value="{% now "Y" %}">
76-
<div class="form-group row">
77-
<div class="col-sm-10">
78-
<button type="submit" class="btn btn-primary">Cadastrar</button>
79-
</div>
80-
</div>
81-
</form>
68+
</div>
8269
</div>
8370
</div>
84-
<hr/>
85-
{% include 'core/instructors.html' %}
86-
<hr/>
87-
{% include 'core/social_proof.html' %}
8871
</div>
8972
{% endblock body %}

pythonpro/core/templates/core/instructors.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% load static %}
22
<div class="row">
33
<div class="col">
4-
<h1 class="text-center mt-4 mb-4">Conheça os Instrutores</h1>
4+
<h1 class="text-center mb-4">Conheça os Instrutores</h1>
55
<div class="row">
66
<div class="col-12 col-md mb-4">
77
<div class="card">

pythonpro/core/templates/core/lead_form.html

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@
1212
maxlength="{{ form.email.max_length }}"
1313
required="required" id="{{ form.email.id_for_label }}">
1414
</div>
15-
<div class="form-group">
16-
<label for="{{ form.password1.id_for_label }}">{{ form.password1.label_tag }}</label>
17-
<input type="password" name="{{ form.password1.html_name }}" class="form-control"
18-
maxlength="{{ form.password1.max_length }}"
19-
required="required" id="{{ form.password1.id_for_label }}">
20-
</div>
21-
<div class="form-group">
22-
<label for="{{ form.password2.id_for_label }}">{{ form.password2.label_tag }}</label>
23-
<input type="password" name="{{ form.password2.html_name }}" class="form-control"
24-
maxlength="{{ form.password2.max_length }}"
25-
required="required" id="{{ form.password2.id_for_label }}">
26-
</div>
27-
<button class="btn btn-lg btn-success">Sim, quero me inscrever e receber o curso grátis &raquo;</button>
15+
{# <div class="form-group">#}
16+
{# <label for="{{ form.password1.id_for_label }}">{{ form.password1.label_tag }}</label>#}
17+
{# <input type="password" name="{{ form.password1.html_name }}" class="form-control"#}
18+
{# maxlength="{{ form.password1.max_length }}"#}
19+
{# required="required" id="{{ form.password1.id_for_label }}">#}
20+
{# </div>#}
21+
{# <div class="form-group">#}
22+
{# <label for="{{ form.password2.id_for_label }}">{{ form.password2.label_tag }}</label>#}
23+
{# <input type="password" name="{{ form.password2.html_name }}" class="form-control"#}
24+
{# maxlength="{{ form.password2.max_length }}"#}
25+
{# required="required" id="{{ form.password2.id_for_label }}">#}
26+
{# </div>#}
27+
<button class="btn btn-lg btn-warning">Sim, quero receber o curso grátis &raquo;</button>
2828
</form>

pythonpro/core/templates/core/lead_form_errors.html

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{% block title %}Curso de Python Grátis{% endblock %}
44
{% block description %}Curso de Básico de Python voltado para quem quer entrar no mercado de tecnologia.{% endblock %}
55
{% block body %}
6-
<div class="bg-info pt-5 pb-5 text-light">
6+
<div class="bg-primary pt-5 pb-5 text-light">
77
<div class="container">
88
<div class="row">
99
<div class="col-12 col-md">
@@ -36,34 +36,8 @@ <h1 class="mb-4">Cadastro com alguns erros</h1>
3636
</div>
3737
{% endif %}
3838
</div>
39-
<div class="form-group">
40-
<label for="{{ form.password1.id_for_label }}">{{ form.password1.label_tag }}</label>
41-
<input type="password" name="{{ form.password1.html_name }}"
42-
class="form-control{% if form.password1.errors %} is-invalid{% endif %}"
43-
autofocus="" maxlength="{{ form.password1.max_length }}"
44-
required="required" id="{{ form.password1.id_for_label }}">
45-
{% if form.password1.errors %}
46-
<div class="invalid-feedback">
47-
{{ form.password1.errors }}
48-
</div>
49-
{% endif %}
50-
<small>{{ form.password1.help_text }}</small>
51-
</div>
52-
<div class="form-group">
53-
<label for="{{ form.password2.id_for_label }}">{{ form.password2.label_tag }}</label>
54-
<input type="password" name="{{ form.password2.html_name }}"
55-
class="form-control {% if form.password2.errors %} is-invalid{% endif %}"
56-
autofocus="" maxlength="{{ form.password2.max_length }}"
57-
required="required" id="{{ form.password2.id_for_label }}">
58-
{% if form.password2.errors %}
59-
<div class="invalid-feedback">
60-
{{ form.password2.errors }}
61-
</div>
62-
{% endif %}
63-
<small>{{ form.password2.help_text }}</small>
64-
</div>
65-
<button class="btn btn-lg btn-success">Sim, quero me inscrever e receber o curso grátis
66-
&raquo;
39+
40+
<button class="btn btn-lg btn-warning">Sim, quero me inscrever e receber o curso grátis &raquo;
6741
</button>
6842
</form>
6943
</div>

0 commit comments

Comments
 (0)