File manager - Edit - /usr/local/CyberPanel/lib/python3.10/site-packages/django/template/__pycache__/library.cpython-310.pyc
Back
o �h4 � @ s� d dl mZ d dlmZ d dlmZmZ d dlmZ d dl m Z ddlmZm Z mZ ddlmZ G d d � d e�ZG dd� d�ZG d d� de�ZG dd� de�ZG dd� de�Zdd� Zdd� ZdS )� )�wraps)� import_module)�getfullargspec�unwrap)�conditional_escape)�is_iterable� )�Node�Template�token_kwargs)�TemplateSyntaxErrorc @ s e Zd ZdS )�InvalidTemplateLibraryN)�__name__� __module__�__qualname__� r r �M/usr/local/CyberPanel/lib/python3.10/site-packages/django/template/library.pyr s r c @ sP e Zd ZdZdd� Zddd�Zdd� Zdd d �Zdd� Zdd d�Z ddd�Z dS )�Librarya A class for registering template tags and filters. Compiled filter and template tag functions are stored in the filters and tags attributes. The filter, simple_tag, and inclusion_tag methods provide a convenient way to register callables as tags. c C s i | _ i | _d S �N)�filters�tags)�selfr r r �__init__ s zLibrary.__init__Nc sx � d u r|d u r�j S � d ur%|d u r%t� �r�� � �S � �fdd�}|S � d ur4|d ur4|�j� <