send/create notification when a new account is created.
authoranoop
Mon, 08 Mar 2010 20:06:40 +0530
changeset 213 a01078a9bbcf
parent 212 9f6a6eaf5df3
child 214 679c7e237052
send/create notification when a new account is created.
taskapp/forms/user.py
--- a/taskapp/forms/user.py	Mon Mar 08 19:49:25 2010 +0530
+++ b/taskapp/forms/user.py	Mon Mar 08 20:06:40 2010 +0530
@@ -9,6 +9,7 @@
 from pytask.taskapp.models import GENDER_CHOICES, Profile
 from registration.forms import RegistrationFormUniqueEmail
 from registration.models import RegistrationProfile
+from pytask.taskapp.utilities.notification import create_notification
 
 class UserProfileEditForm(forms.ModelForm):
     """Form used to edit the profile of a user"""
@@ -51,6 +52,8 @@
         new_profile = Profile(user=new_user,dob=self.cleaned_data['dob'],gender=self.cleaned_data['gender'])
         new_profile.save()
         
+        create_notification('NU',new_user)
+        
         return new_user
 
 def UserChoiceForm(choices, instance=None):