app/soc/models/seed_db.py
changeset 1902 be3dbaa17114
parent 1901 5a98e8a8efb5
child 1903 9d95d3e20773
--- a/app/soc/models/seed_db.py	Mon Mar 16 23:52:22 2009 +0000
+++ b/app/soc/models/seed_db.py	Mon Mar 16 23:52:49 2009 +0000
@@ -361,6 +361,20 @@
   return http.HttpResponse('Done')
 
 
+def seed_user(request, i):
+  """Returns the properties for a new user entity.
+  """
+
+  properties = {
+      'key_name': 'user_%(num)d' % i,
+      'link_id': 'user_%(num)d' % i,
+      'account': users.User(email='user_%(num)d@example.com' % i),
+      'name': 'User %(num)d' % i,
+      }
+
+  return properties
+
+
 def seed_many(request, *args, **kwargs):
   """Seeds many instances of the specified type.
   """
@@ -371,6 +385,7 @@
     return http.HttpResponse('Missing get args.')
 
   seed_types = {
+    'user': (seed_user, User),
     }
 
   goal = int(get_args['goal'])