Skip to content
Snippets Groups Projects
Unverified Commit 1dd70188 authored by Seon82's avatar Seon82 Committed by GitHub
Browse files

Envoi email (#22)


* Password reset feature (#8)

* Add Django Rest auth module

* Try to make the send reset password email work

* Modified template mail for reset

* Add Django Rest auth module

* Try to make the send reset password email work

* Modified template mail for reset

* test

* Ajouté API student

* API GET sans authentification

* Added POST support

* POST API fix

* Fixed charfields length in wiki

* loosen security

* simplify API serialized data

* Implemented partial_update

* Added special teaching and nationality to serializer

* dependantsNumber to int

* Fixed factory imports

* Added write auth and minor serializer fix

* Added read permissions

* Read permissions that work?

* Actually added read permissions?

* Updated tests to pass travis

* Updated tests

* Fixed all factory tests

* Adapté les tests à la nouvelle structure de Student

* Created StaffUserFactory and finished fixing tests

* Update README.md

* Added classType

* Fixed migrations

* Added last modified year & filters in admin interface

* Email notification

Co-authored-by: default avatarchiahetcho <44137047+chiahetcho@users.noreply.github.com>
Co-authored-by: default avatarflorimondmanca <florimond.manca@gmail.com>
Co-authored-by: default avatarDylan Sechet <dylan.sechet@student-cs.fr>
Co-authored-by: default avatarArthur Guédon <arthur.guedon@student-cs.fr>
Co-authored-by: default avatarArthur Guédon <60623551+arthurgdn@users.noreply.github.com>
parent 54c4c0e8
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,9 @@ from dry_rest_permissions.generics import authenticated_users
from .utils import get_promotion_range
from datetime import datetime
from .notifications import SendDocs
class ProfileMixin:
"""Mixin with common functionnality for profiles."""
......@@ -188,6 +191,9 @@ class Student(ProfileMixin, models.Model):
self.year = f"{date_now.year}/{date_now.year+1}"
else:
self.year = f"{date_now.year-1}/{date_now.year}"
SendDocs().send() # send email with link to registration docs
return super(Student,self).save(*args, **kwargs)
class Meta: # noqa
......
from mails import Notification
class SendDocs(Notification):
"""Sends a link to the google docs containing the registration documents"""
subject = "Dossier d'inscription OSER"
template_name = "profiles/registration_docs.md"
\ No newline at end of file
{% extends 'mails/notification.md' %}
{% block greeting %}
Bonjour,
{% endblock %}
{% block body %}
Si tu reçois ce mail c’est que tu as fait un compte sur le site d’OSER et que tu as correctement rempli tes données personnelles. Félicitations ! ✅
Avant de te laisser tranquille et que tu aies accès aux inscriptions pour les sorties et les projets, il te reste une dernière tâche : remplir le dossier d’inscription. Tu peux le trouver à ce lien : [https://drive.google.com/drive/folders/1TSGPRP2dAu07nkucpioWYGToccSU2vLD?usp=sharing](https://drive.google.com/drive/folders/1TSGPRP2dAu07nkucpioWYGToccSU2vLD?usp=sharing) .
Tu peux télécharger le document et l’imprimer. Si tu n’as pas d’imprimante tu peux demander un dossier papier à un tuteur de ta séance. Il faut rendre ce dossier sous format papier rempli aux tuteurs de ta séance. Dès que l’on recevra ton dossier, on validera ton compte !
{% endblock %}
{% block signature %}
On espère passer une super année avec toi,
L’équipe OSER
{% endblock %}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment