def post(self): user = users.get_current_user() a = Accounts(name=self.request.get('name'), amount=float(self.request.get('amount'))) a.put() logging.info('************ ' + user.nickname() + ' Added Account ' + a.name + ' *******') return webapp2.redirect('/view_accounts')
def post(self): username = self.request.get("uName") password = self.request.get("pass") acc = Accounts(Username=username, Password=password) acc.put() var_dict = { "all_acc": Accounts.query().fetch(), "user": username, "pass": password } print(var_dict["all_acc"]) result_template = the_jinja_env.get_template('/HTML/search.html') self.response.write(result_template.render(var_dict))
def post(self): if self.request.get("create_btn") == "Submit": email = self.request.get("email") password = self.request.get("password") mailing_address = self.request.get("mailing_address") first_name = self.request.get("first_name") last_name = self.request.get("last_name") token = id_generator() account = Accounts(email=email, password=password, mailing_address=mailing_address, first_name=first_name, last_name=last_name, tokens=token) account.put() self.redirect('/') else: self.redirect('/')