Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

integrado com sendgrid close #53 #54

Merged
merged 1 commit into from
Nov 25, 2023
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
11 changes: 10 additions & 1 deletion contrib/env-sample
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,13 @@ AWS_ACCESS_KEY_ID =
AWS_SECRET_ACCESS_KEY =
AWS_STORAGE_BUCKET_NAME =
INTERNAL_IPS=127.0.0.1
SENTRY_DSN=
SENTRY_DSN=

# Configurações de e-mail
EMAIL_BACKEND=django.core.mail.backends.console.EmailBackend
EMAIL_HOST=localhost
EMAIL_PORT=25
EMAIL_HOST_USER=
EMAIL_HOST_PASSWORD=
EMAIL_USE_TLS=True
[email protected]
28 changes: 28 additions & 0 deletions pypro/base/templates/registration/password_reset_form.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{% extends 'base/base.html' %}
{% load i18n static %}


{% block title %}Formulário de recuperação de senha.{% endblock %}

{% block body %}
<div class="container">
<div class="row">
<div class="col">
<h1>{{ title }}</h1>
<p>{% translate 'Forgotten your password? Enter your email address below, and we’ll email instructions for setting a new one.' %}</p>

<form method="post">{% csrf_token %}
<fieldset class="module aligned">
<div class="form-row field-email">
{{ form.email.errors }}
<label for="id_email">{% translate 'Email address:' %}</label>
{{ form.email }}
</div>
<input type="submit" value="{% translate 'Reset my password' %}">
</fieldset>
</form>
</div>
</div>
</div>

{% endblock %}
19 changes: 15 additions & 4 deletions pypro/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@


INSTALLED_APPS = [
'pypro.base',
'pypro.turmas',
'pypro.aperitivos',
'pypro.modulos',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'collectfast',
'django.contrib.staticfiles',
'pypro.base',
'pypro.turmas',
'pypro.aperitivos',
'pypro.modulos',
'ordered_model',
'django_extensions',
]
Expand Down Expand Up @@ -89,6 +89,17 @@

WSGI_APPLICATION = 'pypro.wsgi.application'

# Configuração de envio de e-mail
EMAIL_BACKEND = config('EMAIL_BACKEND')
EMAIL_HOST = config('EMAIL_HOST')
EMAIL_PORT = config('EMAIL_PORT')
EMAIL_HOST_USER = config('EMAIL_HOST_USER')
EMAIL_HOST_PASSWORD = config('EMAIL_HOST_PASSWORD')
EMAIL_USE_TLS = config('EMAIL_USE_TLS')

DEFAULT_FROM_EMAIL = config('DEFAULT_FROM_EMAIL')


# Configuração django-debug-toolbar

INTERNAL_IPS = config('INTERNAL_IPS', cast=Csv(), default='127.0.0.1')
Expand Down
Loading