Esempio n. 1
0
    def get(self):

        # create our form page
        f = Form()
        # create the results view
        rp = ResultsPage()

        # GET Method to grab variables from user input
        if self.request.GET:
            # storing our info from the user inputs
            # call our BudgetBreak Object
            user = BudgetBreak()
            user.name = self.request.GET["name"]
            user.email = self.request.GET["email"]
            user.mon_exp = int(self.request.GET["monExp"])
            user.mon_income = int(self.request.GET["monIncome"])
            user.have_budget = self.request.GET["budget"]

            # RESULTS PAGE - INFORMATION
            # Print out if form has been submitted otherwise print out following else:
            rp.email = user.email  # setting for print out of HTML elements on pages.py
            rp.annual = user.annual()
            rp.discretion = user.discretion()
            rp.name = user.name
            rp.mon_income = user.mon_income
            rp.mon_exp = user.mon_exp
            rp.calc_mortgage = user.calc_mortgage()
            # WOOOHOOOOOOO

            self.response.write(rp.print_out())
        else:
            self.response.write(f.print_out())  # this will print out in browser
Esempio n. 2
0
 def get(self):
     event_form = Form()        
     #print event_form.print_out()#this will print out in the google engine console
     if self.request.GET:
         #storing our info from the user inputs
         attendee = self.request.GET['attendee']
         email = self.request.GET['email']
         workshops = self.request.get_all('workshops')            
         hear = self.request.GET['hear']
         rp = self.request.GET['rp']
         rpComments = self.request.GET['rpComments']
         diet = self.request.GET['diet']
         dietDetails = self.request.GET['dietDetails']
         payment = self.request.GET['payment']
         communication = self.request.GET['communication']
         purpose = self.request.GET['purpose']
         #Print out if form has been submitted otherwise print out following else:
         self.response.write(event_form.head + event_form.header +  "Thank you for taking our survey, " + attendee + '.' + '<br />' + "Here is a listing of your detailed information that you submitted: " + '<br />' + "Your email is " + email + '<br />' +  "You will be attending the " + ', '.join(workshops) + " workshop."  + '<br />' + "You heard about us via " + hear + '.' + '<br />' + "You found our registration process to be " + rp + " and left " + rpComments + " as comments" + '<br />' + "You checked that you " + diet + " have any diet restrictions. If yes, you added these comments:  " + dietDetails + '<br />' + "Your attendance at our workshops will be paid by your " + payment + '.' + '<br />' + "You are best reached by " + communication + " with any further information about this event. <br /> You utilize these skills within the context of your " + purpose + " ." + event_form.close)
     else:           
         self.response.write(event_form.print_out())# this will print out in browser
Esempio n. 3
0
    def get(self):

        #create our form page
    	f = Form()
    	#create the results view
    	rp = ResultsPage()       
        
    	#GET Method to grab variables from user input
        if self.request.GET:
            #storing our info from the user inputs
            #call our BudgetBreak Object
            user = BudgetBreak()
            user.name = self.request.GET['name']
            user.email = self.request.GET['email']
            user.mon_exp = int(self.request.GET['monExp'])  
            user.mon_income = int(self.request.GET['monIncome'])        
            user.have_budget = self.request.GET['budget']

            #RESULTS PAGE - INFORMATION 
            #Print out if form has been submitted otherwise print out following else:
            self.response.write(rp.print_out() + '<h3>Greetings, ' +  user.name + '!</h3>' +  'From the information provided we have calculated the following information.<br/>' + 'Your email is: ' + user.email + '</p>' + 'The total of your recurring monthly expenses is: ' + str(user.mon_exp) + '<br />' + ' Your total monthly income is: ' + str(user.mon_income) + '<br />' + 'Your total monthly discretionary funds comes to ' + str(user.discretion()) + '<br />' +  'You ' + user.have_budget + ' use a budget to track your expenses and income.' + '<br />' +'Your estimated mortgage allowance should be ' + str(user.calc_mortgage()) + '<br />' + 'Your annual income is: ' + str(user.annual()))
        else:           
        	self.response.write(f.print_out())# this will print out in browser