Beispiel #1
0
 def post(self):
     from models import NotifyReleasePerson
     full_name = self.request.get('full_name')
     mobile_number = self.request.get('mobile_number')
     email = self.request.get('email')
     
     person = NotifyReleasePerson(full_name=full_name, email=email, mobile_number=mobile_number)
     person.put()
     self.render_to_response("thanks/notify_release.html")
Beispiel #2
0
    def post(self):
        from models import SuggestedTitle, SuggestedTitlePerson
        title = self.request.get('title')
        full_name = self.request.get('full_name')
        mobile_number = self.request.get('mobile_number')
        email = self.request.get('email')
        register_for_book = self.request.get('register_for_book')
        
        to_be_saved = []
        if register_for_book and register_for_book == 'yes':
            from models import NotifyReleasePerson
            person = NotifyReleasePerson(full_name=full_name, email=email, mobile_number=mobile_number)
            to_be_saved.append(person)

        suggested_title = SuggestedTitle.up_vote_or_insert(title=title)        
        person = SuggestedTitlePerson(full_name=full_name, email=email, mobile_number=mobile_number)
        person.suggested_title = suggested_title
        to_be_saved.append(person)
        db.put(to_be_saved)
        self.render_to_response('thanks/suggested_title.html')