-
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.
Criando a página do projeto estação cultural, criando classes no view…
…s, definindo urls e testando o sistema.
- Loading branch information
1 parent
2adb1b6
commit a374b48
Showing
28 changed files
with
2,509 additions
and
195 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from django import forms | ||
from django.core.mail.message import EmailMessage | ||
|
||
class ContatoForm(forms.Form): | ||
nome = forms.CharField(label='Nome', max_length=100) | ||
email = forms.EmailField(label='E-mail', max_length=100) | ||
assunto = forms.CharField(label='Assunto', max_length=100) | ||
mensagem = forms.CharField(label='Mensagem', widget=forms.Textarea()) | ||
|
||
def send_mail(self): | ||
nome = self.cleaned_data['nome'] | ||
email = self.cleaned_data['email'] | ||
assunto = self.cleaned_data['assunto'] | ||
mensagem = self.cleaned_data['mensagem'] | ||
|
||
conteudo = f'Nome: {nome}\nE-mail: {email}\nAssunto: {assunto}\nMensagem: {mensagem}' | ||
|
||
mail = EmailMessage( | ||
subject=assunto, | ||
body=conteudo, | ||
from_email='contato@dominio.com.br', | ||
to=['contato@dominio.com.br',], | ||
headers={'Reply-To': email} | ||
) | ||
mail.send() |
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,19 @@ | ||
# Generated by Django 4.2.8 on 2023-12-24 19:59 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('aplic', '0011_alter_oficina_descricao_alter_oficina_resumo'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='oficina', | ||
name='area', | ||
field=models.TextField(default=1, help_text='Insira a área da oficina, como Artes cênicas, canto', verbose_name='Área da Oficina'), | ||
preserve_default=False, | ||
), | ||
] |
Binary file added
BIN
+970 Bytes
trupencanta/aplic/migrations/__pycache__/0012_oficina_area.cpython-311.pyc
Binary file not shown.
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
Oops, something went wrong.