diff -r 9a77edda77b7 -r fda1c66b25f9 scripts/scipy_migrate.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/scipy_migrate.py Fri Oct 30 15:09:12 2009 +0530 @@ -0,0 +1,32 @@ +"""Helper script to send an email to all users who registered +before activation logic was implemented. This script can be +run only within a Django shell. +""" + + +__authors__ = [ + '"Madhusudan.C.S" ', + ] + + +from datetime import datetime + +from django.template import loader + +from registration.models import RegistrationProfile + + +def remind_users(): + regs = RegistrationProfile.objects.filter( + user__is_active=0, + user__date_joined__lte=datetime(2009, 10, 13)) + + template = 'notifications/activate_mail.html' + + for reg in regs: + + subject = "Update and activate your SciPy.in registration." + message = loader.render_to_string(template, dictionary={'activation_key': reg.activation_key}) + + reg.user.email_user(subject=subject, message=message) +