Fixed the getting profile and name model property.
authorMadhusudan.C.S <madhusudancs@gmail.com>
Fri, 21 Jan 2011 19:57:40 +0530
changeset 511 50a5bdd313ac
parent 510 125cdcf69515
child 512 0e10910f6c46
Fixed the getting profile and name model property.
scripts/mails.py
--- a/scripts/mails.py	Fri Jan 21 19:48:33 2011 +0530
+++ b/scripts/mails.py	Fri Jan 21 19:57:40 2011 +0530
@@ -18,12 +18,12 @@
 
     users = User.objects.all()
 
-    subject = loader.render_to_string(subject_template)
+    subject = loader.render_to_string(subject_template).strip(' \n\t')
 
     for user in users:
-        profile = user.getprofile()
+        profile = user.get_profile()
         if profile:
-            full_name = profile.name
+            full_name = profile.full_name
         else:
             full_name = ''