view
view copied to clipboard
Inline templates
Do we want to add support for inline templates? That is, templates that are defined as strings in the View class, and not in a separate file to be read. I think it'd be helpful, and we could also simplify the configuration by not requiring paths
What should the API look like?
- Override
def templateand returns a string? - Add a
templateDSL which takes a string? - Put at the end of the file after END, then use DATA to access it? (A strange idea surely, and could be implemented via the other two if someone wanted to)
Similarly, would we want to allow layouts to be defined inline? I imagine it would be defined in a local base class, and inherited by the children.