Пример #1
0
Файл: rpc.py Проект: jamslevy/PQ
  def add_business(self, *args):
	if not args: return "Specify A Business Name"
	if len(args) < 1: return "Specify A Business Name"
	business_name = args[0]
	from employer.methods import DataMethods
	dm = DataMethods()
	email = business_name + "@" + "test_" + business_name + ".com"
	return dm.create_business_account(business_name, email, proficiencies=False, batch=False)
Пример #2
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"