예제 #1
0
파일: rpc.py 프로젝트: jamslevy/PQ
 def accept_application(self, *args):
   if not args: return "specify sponsor name (case sensitive)"
   from model.employer import Sponsor_Application
   this_sponsor = Sponsor_Application.gql("WHERE name = :1", args[0]).get()
   from employer.methods import DataMethods
   dm = DataMethods()
   if this_sponsor is None: return "application not found"
   new_account = dm.create_business_account(this_sponsor.name, this_sponsor.email, proficiencies=False, batch=False)
   from accounts.mail import mail_sponsor_intro
   if len(new_account) > 1: mail_sponsor_intro(new_account[1])
   else: return "not mailing intro - it appears that this application has already been accepted"
   return "OK"
예제 #2
0
파일: rpc.py 프로젝트: jamslevy/PQ
  def sponsor_apply(self): 	
	from model.employer import Sponsor_Application
	sponsor_app = Sponsor_Application(name = self.request.get('name'),
	                                      email = self.request.get('email') )
	sponsor_app.put()
	return "OK"