added key to the notification
authorNishanth Amuluru <nishanth@fossee.in>
Fri, 07 Jan 2011 12:53:12 +0530
changeset 281 20f411241654
parent 280 a3a44b21845d
child 282 69d1c4b99503
added key to the notification
profile/management/commands/seed_db.py
--- a/profile/management/commands/seed_db.py	Fri Jan 07 12:43:01 2011 +0530
+++ b/profile/management/commands/seed_db.py	Fri Jan 07 12:53:12 2011 +0530
@@ -5,6 +5,7 @@
 from django.contrib.auth.models import User
 
 from pytask.profile.models import Profile, Notification
+from pytask.utils import make_key
 
 def seed_db():
     """ a method to seed the database with random data """
@@ -46,7 +47,8 @@
         Notification(sent_to=new_user, sent_date=datetime.now(), 
                      subject="A subject here for"+str(i),
                      message="A message with mess"+str(i)+" html inside.\
-                     <br /><b>a bold text</b>"
+                     <br /><b>a bold text</b>",
+                     uniq_key=make_key(Notification),
                     ).save()
 
 class Command(NoArgsCommand):