Ejemplo n.º 1
0
 def index(self, req, body=None):
     """Return all versions."""
     builder = views_versions.get_view_builder(req)
     return builder.build_versions(VERSIONS)
Ejemplo n.º 2
0
 def multi(self, req, body=None):
     """Return multiple choices."""
     builder = views_versions.get_view_builder(req)
     return builder.build_choices(VERSIONS, req)
Ejemplo n.º 3
0
 def show(self, req):
     builder = views_versions.get_view_builder(req)
     return builder.build_version(VERSIONS['v2.0'])
Ejemplo n.º 4
0
 def multi(self, req, body=None):
     """Return multiple choices."""
     builder = views_versions.get_view_builder(req)
     return builder.build_choices(VERSIONS, req)
Ejemplo n.º 5
0
 def index(self, req, body=None):
     """Return all versions."""
     builder = views_versions.get_view_builder(req)
     return builder.build_versions(VERSIONS)
Ejemplo n.º 6
0
 def show(self, req):
     builder = views_versions.get_view_builder(req)
     return builder.build_version(VERSIONS['v2.0'])
Ejemplo n.º 7
0
    def show(self, req, id='v2.1'):
        builder = views_versions.get_view_builder(req)
        if id not in versions.VERSIONS:
            raise webob.exc.HTTPNotFound()

        return builder.build_version(versions.VERSIONS[id])