Templates¶
View¶
-
class
dragonfly.template.template.View(template, **kwargs)¶ Bases:
objectReturns a HTML version (view) of the requested template. The class first attempts to locate the deisred view. If a pre-compiled python version of the template does not exist or is out of date, the class will generate one. Otherwise it imports the compiled python file and runs the
get_htmlmethod, passing in any variables that the user.py has given to the constructor (via**kwargs). It then returns aResponsewith this HTML. :param template: The view to return :type template: str
Warning
The following classes should not be called directly.