예제 #1
0
 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)
예제 #2
0
    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)
예제 #3
0
파일: db.py 프로젝트: phiiil/veosan
def get_all_domain_setup():
    return DomainSetup.query().fetch()
예제 #4
0
파일: db.py 프로젝트: phiiil/veosan
def get_domain_setup(domain):
    if domain:
        return DomainSetup.query(DomainSetup.domain_name == domain).get()
예제 #5
0
파일: db.py 프로젝트: deltron/veosan
def get_all_domain_setup():
    return DomainSetup.query().fetch()
예제 #6
0
파일: db.py 프로젝트: deltron/veosan
def get_domain_setup(domain):
    if domain:
        return DomainSetup.query(DomainSetup.domain_name == domain).get()