def post(self):
        submit_checkbook = self.request.get('checkbook')
        submit_debit = self.request.get('debit')
        submit_credit = self.request.get('credit')

        user = users.get_current_user()


        #shouldn't need this here
        #should only matter in get because if the user
        #isn't logged in they cant travel to the userpage.
        if not user or not submit_checkbook:
            self.redirect('/userpage')
            return

        to_save = []

        checkbook = Checkbook()
        checkbook.author = user
        checkbook.name = self.request.get('new_checkbook')
        checkbook.amount = float(self.request.get('amount', 0.0))
        checkbook.active = True
        to_save.append(checkbook)

        total_value = checkbook.amount

        transaction = Transaction()
        transaction.author = user

        if submit_debit:
            transaction.debit_amount = float(
                self.request.get('debit_amount', 0.0))
            transaction.description = self.request.get('debit_tran_des')
            transaction.debit_amount = 0.0
            transaction.total = total_value + transaction.debit_amount
            #to_save.append(transaction)
            
        if submit_credit:
            transaction.credit_amount = float(
                self.request.get('credit_amount', 0.0))
            transaction.description = self.request.get('credit_tran_des', 0.0)
            transaction.debit_amount = 0.0
            transaction.total = total_value - transaction.credit_amount
            #to_save.append(transaction)

        total = Total()
        total.author = user
        total.checkbook_total = total_value
        to_save.append(total)


        db.put(to_save)
        db.put(transaction)

        self.redirect('/userpage')

thats what I have right now.