How to use the template.output function in template

To help you get started, we’ve selected a few template examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github heynemann / skink / skink / controllers / __init__.py View on Github external
    @authenticated()
    @template.output("pipeline_index.html")
    def edit(self, pipeline_id):
        pipelines = self.repository.get_all()
        pipeline = self.repository.get(pipeline_id)
        return template.render(authenticated=self.authenticated(), pipeline=pipeline, pipelines=pipelines, errors=None)
github heynemann / skink / skink / controllers / __init__.py View on Github external
    @authenticated()
    @template.output("create_project.html")
    def edit(self, project_id):
        project = self.repository.get(project_id)
        return template.render(authenticated=self.authenticated(), project=project)
github heynemann / skink / skink / controllers / __init__.py View on Github external
    @authenticated()
    @template.output("pipeline_index.html") 
    def update(self, pipeline_id, name, pipeline_definition):
        pipeline = self.repository.get(int(pipeline_id))
        try:
            pipeline = self.repository.update(pipeline.id, name, pipeline_definition)
            PluginEvents.on_pipeline_updated(pipeline)
            raise cherrypy.HTTPRedirect('/pipeline')
        except (ProjectNotFoundError, CyclicalPipelineError), err:
            pipelines = self.repository.get_all()
            return template.render(authenticated=self.authenticated(), pipelines=pipelines, pipeline=pipeline, errors=[err.message,]) | HTMLFormFiller(data=locals())
github heynemann / skink / skink / controllers / __init__.py View on Github external
    @template.output("login.html")
    def login_error(self, cancel=False, **data):
        data["login_error"] = "In order to do that you need to login. Please perform login below."
        return self.do_login(cancel, data)
github heynemann / skink / skink / controllers / __init__.py View on Github external
    @template.output("project_details.html")
    def build_details(self, project_id, build_id):
        return self.render_details(project_id, build_id)
github heynemann / skink / skink / controllers / __init__.py View on Github external
    @template.output("project_details.html")
    def details(self, project_id):
        return self.render_details(project_id)
github heynemann / skink / skink / controllers / __init__.py View on Github external
    @template.output("login.html")
    def login(self, cancel=False, **data):
        return self.do_login(cancel, data)
github heynemann / skink / skink / controllers / __init__.py View on Github external
    @template.output("dashboard.html")
    def dashboard(self):
        repository = ProjectRepository()
        projects = repository.get_all()
        return template.render(authenticated=self.authenticated(), projects=projects)
github heynemann / skink / skink / controllers / __init__.py View on Github external
    @template.output("pipeline_index.html")
    def index(self):
        pipelines = self.repository.get_all()
        return template.render(authenticated=self.authenticated(), pipeline=None, pipelines=pipelines, errors=None)
github heynemann / skink / skink / controllers / __init__.py View on Github external
    @authenticated()
    @template.output("create_project.html")
    def new(self):
        return template.render(authenticated=self.authenticated(), project=None)