Tools

tools.decorators.class_login_required(func)[source]

A decorator to check if a user is logged in before accessing a class-based view.

tools.decorators.func_login_required(func)[source]

A decorator to check if a user is logged in before accessing a function-based view.

tools.logger.get_logger()[source]

Return for the project. It is used to log information, warnings and errors. ‘from tools.logger import logger’

tools.middleware.simple_middleware(get_response)[source]

A simple middleware that logs the response.

class tools.mixins.MessageMixin[source]

Bases: object

MixinClass to add template pass for messages.

The class has the following attributes: - message_template (str): The name of the template to be rendered.

message_template = 'message.html'