Skip to content

Commit

Permalink
integrado com sendgrid close #53
Browse files Browse the repository at this point in the history
  • Loading branch information
matheuspdf committed Nov 25, 2023
1 parent 1436e09 commit 75e1f28
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 5 deletions.
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

0 comments on commit 75e1f28

Please sign in to comment.