def get(self, domain = None): if not domain: self.render_template('admin/domain-setup.html', domain_list = util.DOMAINS) else: domain_setup = db.get_domain_setup(domain) if not domain_setup: domain_setup = DomainSetup() domain_setup.domain_name = domain domain_setup.put() domain_setup_form = DomainSetupForm().get_form(obj=domain_setup) self.render_template('admin/domain-setup.html', domain=domain, form=domain_setup_form)
def get(self, domain=None): if not domain: self.render_template('admin/domain-setup.html', domain_list=util.DOMAINS) else: domain_setup = db.get_domain_setup(domain) if not domain_setup: domain_setup = DomainSetup() domain_setup.domain_name = domain domain_setup.put() domain_setup_form = DomainSetupForm().get_form(obj=domain_setup) self.render_template('admin/domain-setup.html', domain=domain, form=domain_setup_form)
def get_all_domain_setup(): return DomainSetup.query().fetch()
def get_domain_setup(domain): if domain: return DomainSetup.query(DomainSetup.domain_name == domain).get()