Skip to content
Snippets Groups Projects

Improve automatic emails with temporary urls

Merged Flavio TARSETTI requested to merge 542_temporary_urls into master
1 file
+ 1
2
Compare changes
  • Side-by-side
  • Inline
@@ -40,6 +40,7 @@ from django.template import loader
from ...models import SupervisionTrack
from ...models import Profile
from ...models import TemporaryUrl
from ....ui.registration.models import RegistrationProfile
from ....utils import mail
@@ -210,9 +211,13 @@ class Command(BaseCommand):
if supervisiontrack.expiration_date.date() - now.date() == datetime.timedelta(days=expiration_reminder):
warned_count += 1
temp_url = TemporaryUrl.objects.create_temporary_url(TemporaryUrl.YEARREVALIDATION, supervisiontrack)
context = {
'user': user,
'expiration_date': supervisiontrack.expiration_date.date(),
"prefix": server_address,
"temp_url": temp_url.url_hash,
}
mail.send_email('registration/mail.account_revalidation.subject.txt',
Loading