equal
deleted
inserted
replaced
137 def type(self): |
137 def type(self): |
138 return Organization |
138 return Organization |
139 |
139 |
140 def seed(self, i, entities=None, current_user=None, gsoc2009=None): |
140 def seed(self, i, entities=None, current_user=None, gsoc2009=None): |
141 properties = { |
141 properties = { |
142 'key_name': 'google/gsoc2009/%04d' % i, |
142 'key_name': 'google/gsoc2009/org_%04d' % i, |
143 'link_id': 'org_%04d' % i, |
143 'link_id': 'org_%04d' % i, |
144 'name': 'Organization %04d' % i, |
144 'name': 'Organization %04d' % i, |
145 'short_name': 'Org %04d' % i, |
145 'short_name': 'Org %04d' % i, |
146 'founder': current_user, |
146 'founder': current_user, |
147 'scope_path': 'google/gsoc2009', |
147 'scope_path': 'google/gsoc2009', |
195 |
195 |
196 |
196 |
197 def seed(self, i, entities=None, current_user=None, gsoc2009=None, |
197 def seed(self, i, entities=None, current_user=None, gsoc2009=None, |
198 status=None): |
198 status=None): |
199 properties = { |
199 properties = { |
200 'key_name': 'google/gsoc2009/org_app_%04d' % i, |
200 'key_name': 'google/gsoc2009/org_%04d' % i, |
201 'link_id': 'org_app_%04d' % i, |
201 'link_id': 'org_%04d' % i, |
202 'name': 'Org App %04d' % i, |
202 'name': 'Org App %04d' % i, |
203 'scope_path': 'google/gsoc2009', |
203 'scope_path': 'google/gsoc2009', |
204 'scope': gsoc2009, |
204 'scope': gsoc2009, |
205 'status': status, |
205 'status': status, |
206 'applicant': current_user, |
206 'applicant': current_user, |
372 'continued_contribs': 'We promise them a cake.', |
372 'continued_contribs': 'We promise them a cake.', |
373 'agreed_to_admin_agreement': True, |
373 'agreed_to_admin_agreement': True, |
374 } |
374 } |
375 |
375 |
376 for i in range(10): |
376 for i in range(10): |
377 org_app_properties['key_name'] = 'google/gsoc2009/org_app_%04d' % i |
377 org_app_properties['key_name'] = 'google/gsoc2009/org_%04d' % i |
378 org_app_properties['link_id'] = 'org_app_%04d' % i |
378 org_app_properties['link_id'] = 'org_%04d' % i |
379 org_app_properties['name'] = 'Org App %04d' % i |
379 org_app_properties['name'] = 'Org App %04d' % i |
380 entity = OrgApplication(**org_app_properties) |
380 entity = OrgApplication(**org_app_properties) |
381 entity.put() |
381 entity.put() |
382 |
382 |
383 |
383 |
529 |
529 |
530 if not gsoc2009: |
530 if not gsoc2009: |
531 raise Error('Run seed_db first') |
531 raise Error('Run seed_db first') |
532 |
532 |
533 properties = { |
533 properties = { |
534 'key_name': 'google/gsoc2009/org_app_%d' % i, |
534 'key_name': 'google/gsoc2009/org_%d' % i, |
535 'link_id': 'org_app_%d' % i, |
535 'link_id': 'org_%d' % i, |
536 'name': 'Org App %d' % i, |
536 'name': 'Org App %d' % i, |
537 'scope_path': 'google/gsoc2009', |
537 'scope_path': 'google/gsoc2009', |
538 'scope': gsoc2009, |
538 'scope': gsoc2009, |
539 'status': status, |
539 'status': status, |
540 'applicant': current_user, |
540 'applicant': current_user, |