Server : Apache System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64 User : dh_edsupp ( 6597262) PHP Version : 8.2.26 Disable Function : NONE Directory : /lib/python3/dist-packages/django/template/__pycache__/ |
Upload File : |
o 3�a2 � @ s� d dl Z d dlmZ d dlmZmZ d dlmZ d dlm Z ddl mZmZm Z ddlmZ G d d � d e�ZG dd� d�ZG d d� de�ZG dd� de�ZG dd� de�Zdd� Zdd� ZdS )� N)� import_module)�getfullargspec�unwrap)�conditional_escape)�is_iterable� )�Node�Template�token_kwargs)�TemplateSyntaxErrorc @ s e Zd ZdS )�InvalidTemplateLibraryN)�__name__� __module__�__qualname__� r r �9/usr/lib/python3/dist-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� <