Table of Contents
BasePagesanic.pages.baseCSSsanic.pages.cssDirectoryPagesanic.pages.directory_pageFileInfosanic.pages.directory_pageErrorPagesanic.pages.errorsanic.pages.base.BasePage#
Base page for Sanic pages.
class BasePage(debug: <class 'bool'> = True): -> None
style#
Returns the CSS for the page.
@property
def style(self): -> <class 'str'>
Return
- str
The CSS for the page.
sanic.pages.css.CSS#
Cascade stylesheets, i.e. combine all ancestor styles
class CSS(name, bases, attrs)
register#
Register a virtual subclass of an ABC.
def register(cls, subclass)
Returns the subclass, to allow usage as a class decorator.
sanic.pages.directory_page.DirectoryPage#
Page for viewing a directory.
class DirectoryPage(files: typing.Iterable[sanic.pages.directory_page.FileInfo], url: <class 'str'>, debug: <class 'bool'>): -> None
style#
Returns the CSS for the page.
@property
def style(self): -> <class 'str'>
Return
- str
The CSS for the page.
sanic.pages.error.ErrorPage#
Page for displaying an error.
class ErrorPage(debug: <class 'bool'>, title: <class 'str'>, text: <class 'str'>, request: <class 'sanic.request.types.Request'>, exc: <class 'Exception'>): -> None
style#
Returns the CSS for the page.
@property
def style(self): -> <class 'str'>
Return
- str
The CSS for the page.