models.Template - Template

class crotal.models.Template(**attributes)[source]

Model Template for templates of the site.

Attributes:

PATH: The relative path where this model is related to, please use the relative path to this script.

path: The path of the template file.

layout: The layout of the template file, which indicates the way that the template is going to be displayed.

content: The content of the template as a string.

classmethod parse_content(file_path, content, config)[source]

Overriding the parse_content of models.BaseModel and returns a Template object.

Parameters
  • file_path -- Path of the designated file.
  • content -- Content of the file as a string.
  • config -- A configuration instance.
Returns

A template object.