app/soc/models/seed_db.py
changeset 1623 8b70d6bb3f8f
parent 1609 cd285bc524f1
child 1789 6f112b2ebd1f
equal deleted inserted replaced
1622:1ecd37ddc145 1623:8b70d6bb3f8f
    27 
    27 
    28 from google.appengine.api import users
    28 from google.appengine.api import users
    29 from google.appengine.api import memcache
    29 from google.appengine.api import memcache
    30 from google.appengine.ext import db
    30 from google.appengine.ext import db
    31 
    31 
    32 from soc.logic.models import rankerroot
    32 from soc.logic.models.ranker_root import logic as ranker_root_logic
    33 from soc.models import student_proposal
    33 from soc.models import student_proposal
    34 from soc.models.document import Document
    34 from soc.models.document import Document
    35 from soc.models.host import Host
    35 from soc.models.host import Host
    36 from soc.models.mentor import Mentor
    36 from soc.models.mentor import Mentor
    37 from soc.models.notification import Notification
    37 from soc.models.notification import Notification
   244     })
   244     })
   245 
   245 
   246   melange = Organization(**group_properties)
   246   melange = Organization(**group_properties)
   247   melange.put()
   247   melange.put()
   248   # create a new ranker
   248   # create a new ranker
   249   rankerroot.logic.create(student_proposal.DEF_RANKER_NAME, melange,
   249   ranker_root_logic.create(student_proposal.DEF_RANKER_NAME, melange,
   250       student_proposal.DEF_SCORE, 100)
   250       student_proposal.DEF_SCORE, 100)
   251 
   251 
   252   group_properties.update({
   252   group_properties.update({
   253     'scope_path': 'google/gsoc2009',
   253     'scope_path': 'google/gsoc2009',
   254     'scope': gsoc2009,
   254     'scope': gsoc2009,
   264         })
   264         })
   265 
   265 
   266     entity = Organization(**group_properties)
   266     entity = Organization(**group_properties)
   267     entity.put()
   267     entity.put()
   268     # create a new ranker
   268     # create a new ranker
   269     rankerroot.logic.create(student_proposal.DEF_RANKER_NAME, entity,
   269     ranker_root_logic.create(student_proposal.DEF_RANKER_NAME, entity,
   270         student_proposal.DEF_SCORE, 100)
   270         student_proposal.DEF_SCORE, 100)
   271 
   271 
   272 
   272 
   273   role_properties.update({
   273   role_properties.update({
   274       'key_name': 'google/ghop2009/melange/test',
   274       'key_name': 'google/ghop2009/melange/test',