Exemplo n.º 1
0
    def _generate_domain_index(self):
        settings = Settings.all()
        domains = []
        for setting in settings:
          domains.append(setting.domain)

        return domains
Exemplo n.º 2
0
    def _generate_domain_index(self):
        settings = Settings.all()
        domains = []
        for setting in settings:
            domains.append(setting.domain)

        return domains
Exemplo n.º 3
0
    def load_or_init_settings(self):
        from drydrop.app.models import Settings

        # fetch settings
        settings = Settings.all().filter("domain =",
                                         os.environ['SERVER_NAME']).fetch(1)
        if len(settings) == 0:
            s = Settings()
            s.source = "http://github.com/darwin/drydrop/raw/master/tutorial"
            s.config = "site.yaml"
            s.domain = os.environ['SERVER_NAME']
            s.put()
            settings = [s]
        self.settings = settings[0]
Exemplo n.º 4
0
 def load_or_init_settings(self):
     from drydrop.app.models import Settings
     
     # fetch settings
     settings = Settings.all().filter("domain =", os.environ['SERVER_NAME']).fetch(1)
     if len(settings)==0:
         s = Settings()
         s.source = "http://github.com/darwin/drydrop/raw/master/tutorial"
         s.config = "site.yaml"
         s.domain = os.environ['SERVER_NAME']
         s.put()
         settings = [s]
     self.settings = settings[0]