from flask import render_template

class {{ class_name }}:
    """Controller for handling {{ class_name.replace('Controller', '').lower() }} related requests.

    This controller follows Flask MVC patterns and includes common HTTP methods.
    Each method should return appropriate responses for web or API requests.
    """

    def index(self):
        """ Display the index page. """

        return "Hello from {{ class_name }}!"

    def show(self, id: int):
        """ Show a specific resource. """

        return f"Showing {{ class_name.replace('Controller', '').lower() }} with ID: {id}"

    def new(self):
        """ Show a specific resource. """

        return render_template("home/new.html")

    def create(self):
        """Create a new resource. """

        return "Resource created successfully", 201

    def edit(self, id: int):
        """ Show a specific resource. """

        return render_template("home/edit.html", id=id)

    def update(self, id: int):
        """Update an existing resource. """

        return f"Resource {id} updated successfully"

    def delete(self, id: int):
        """Delete a resource. """

        return f"Resource {id} deleted successfully"
