def post(self): try: domain_id = self.request.get('domain') title = self.request.get('title') except (TypeError, ValueError): self.error(403) return user = api.get_user() domain = api.create_domain(domain_id, title, user) if not domain: self.response.out.write("Could not create domain") return self.response.out.write("Created domain '%s'" % domain.key().name())
def post(self): try: domain_id = self.request.get('domain') title = self.request.get('title') except (TypeError, ValueError): self.error(403) return user = api.get_user() domain = api.create_domain(domain_id, title, user) if not domain: self.response.out.write("Could not create domain") return session = Session(writer='cookie', wsgiref_headers=self.response.headers) add_message(session, "Created domain '%s'" % domain.key().name()) self.redirect('/d/%s/' % domain.key().name())
def post(self): try: domain_id = self.request.get('domain') title = self.request.get('title') except (TypeError, ValueError): self.error(403) return user = api.get_logged_in_user() domain = api.create_domain(domain_id, title, user) if not domain: self.response.out.write("Could not create domain") return session = Session(writer='cookie', wsgiref_headers=self.response.headers) add_message(session, "Created domain '%s'" % domain.key().name()) self.redirect('/d/%s/' % domain.key().name())