예제 #1
0
 def post(self):
     user = users.get_current_user()
     if user:
      sujet  = SujetModel(
             sujetaddedby  = users.get_current_user(),
             titresujet = self.request.get('sujettitre'),
             description = self.request.get('Resume'),
             organismeref = CompanyModel.getCompanyByName(self.request.get('organisme').strip()))
      sujet.put();
      mots = self.request.get_all('motcle')
      for mot in mots:
          MotcleSujetModel(motcle = mot , sujet = sujet).put()
   
      encadreurs = self.request.get_all('autreencadreure')
      for encadreur in encadreurs:
          EncadreurSujetModel(autreencadreur = encadreur , sujet = sujet).put()
 
      self.redirect('/deals')
예제 #2
0
 def post(self):
     user = users.get_current_user()
     if user:
      person  = PersonModel(
             personaddedby  = users.get_current_user(),
             personname = self.request.get('companyname'),
             personpname = self.request.get('prenom'),
             organisme = CompanyModel.getCompanyByName(self.request.get('organisme').strip()),
             fonction =  self.request.get('fonction'),
             personwebsite = self.request.get('companywebsite'),
             personaddress = self.request.get('companyaddress'),
             personwilaya = self.request.get('companywilaya'),
             persondescription = self.request.get('companydescription'))
      person.put();
      emails = self.request.get_all('companymail')
      for email in emails:
         PersonEmailsModel(email = email , person = person).put()
      tels = self.request.get_all('companytel')
      for tel in tels:
          PersonTelModel(persontel = tel, person = person).put()     
      
      self.redirect('/')