diff options
author | Madhusudan.C.S | 2009-10-30 15:09:12 +0530 |
---|---|---|
committer | Madhusudan.C.S | 2009-10-30 15:09:12 +0530 |
commit | f89410559c20dd88d78ccd6b9d24e7941da9d5ff (patch) | |
tree | 3ad4fb64efc7523d1f3065e0dd03693871d6ce55 /scripts | |
parent | 75f0773685ef0724d8ccc1eb1aab16bba55cd7a7 (diff) | |
download | scipycon-f89410559c20dd88d78ccd6b9d24e7941da9d5ff.tar.gz scipycon-f89410559c20dd88d78ccd6b9d24e7941da9d5ff.tar.bz2 scipycon-f89410559c20dd88d78ccd6b9d24e7941da9d5ff.zip |
Added all the files from kiwipycon and the changes made for SciPy.in.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/scipy_migrate.py | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/scripts/scipy_migrate.py b/scripts/scipy_migrate.py new file mode 100644 index 0000000..bc3bdb9 --- /dev/null +++ b/scripts/scipy_migrate.py @@ -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" <madhusudancs@gmail.com>', + ] + + +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) + |