Example #1
0
 def __init__(self, resource_templates, base=None, params={}):
     Path.__init__(self, None, None, params)
     if isinstance(resource_templates, ResourceTemplates):
         self.resource_templates = resource_templates
     else:
         self.resource_templates = ResourceTemplates(resource_templates)
     self.base = base
     self.application = self
     self.default_class = Path
Example #2
0
 def __init__(self, resource_templates, base=None, params={}):
     Path.__init__(self, None, None, params)
     if isinstance(resource_templates, ResourceTemplates):
         self.resource_templates = resource_templates
     else:
         self.resource_templates = ResourceTemplates(resource_templates)
     self.base = base
     self.application = self
     self.default_class = Path
Example #3
0
class Application(Path):
    def __init__(self, resource_templates, base=None, params={}):
        Path.__init__(self, None, None, params)
        if isinstance(resource_templates, ResourceTemplates):
            self.resource_templates = resource_templates
        else:
            self.resource_templates = ResourceTemplates(resource_templates)
        self.base = base
        self.application = self
        self.default_class = Path

    def candidate_child_templates(self, rel):
        return [self.resource_templates.all_by_name().get(rel)]

    def child_class_for(self, resource_template, params):
        return Path

    def uri(self):
        return self.base
Example #4
0
class Application(Path):
    def __init__(self, resource_templates, base=None, params={}):
        Path.__init__(self, None, None, params)
        if isinstance(resource_templates, ResourceTemplates):
            self.resource_templates = resource_templates
        else:
            self.resource_templates = ResourceTemplates(resource_templates)
        self.base = base
        self.application = self
        self.default_class = Path
        
    def candidate_child_templates(self, rel):
        return [self.resource_templates.all_by_name().get(rel)]

    def child_class_for(self, resource_template, params):
        return Path
        
    def uri(self):
        return self.base