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/trac/admin/__pycache__/ |
Upload File : |
o �k�` � @ s� d dl Z d dlZ d dlZd dlZd dlT d dlmZ d dlmZm Z m Z e j�d�Z dZdZdZG d d � d e�ZG dd� de�ZG d d� de�ZG dd� de�ZG dd� de�Zdd� ZG dd� de�Zddd�Z ddd�ZdS )� N)�*)�levenshtein_distance)�_�get_negotiated_locale� has_babel�LANGz%Y-%m-%dz%Y-%m-%d %H:%M:%Sz YYYY-MM-DDc @ s e Zd ZdZdd� Zdd� ZdS )�IAdminPanelProviderz_Extension point interface for adding panels to the web-based administration interface. c C � dS )z�Return a list of available admin panels. The items returned by this function must be tuples of the form `(category, category_label, page, page_label)`. N� )�reqr r �0/usr/lib/python3/dist-packages/trac/admin/api.py�get_admin_panels$ � z$IAdminPanelProvider.get_admin_panelsc C r )z�Process a request for an admin panel. This function should return a tuple of the form `(template, data)`, where `template` is the name of the template to use and `data` is the data to use when rendering the template. Nr )r �category�page� path_infor r r �render_admin_panel+ r z&IAdminPanelProvider.render_admin_panelN)�__name__� __module__�__qualname__�__doc__r r r r r r r s r c @ s e Zd ZdZddd�ZdS )�AdminCommandErrorz:Exception raised when an admin command cannot be executed.FNc C s t �| |� || _|| _d S �N)� TracError�__init__� show_usage�cmd)�self�msgr r r r r r 6 s zAdminCommandError.__init__)FN)r r r r r r r r r r 4 s r c @ � e Zd ZdZdd� ZdS )�IAdminCommandProviderzlExtension point interface for adding commands to the console administration interface `trac-admin`. c C r )a Return a list of available admin commands. The items returned by this function must be tuples of the form `(command, args, help, complete, execute)`, where `command` contains the space-separated command and sub-command names, `args` is a string describing the command arguments and `help` is the help text. The first paragraph of the help text is taken as a short help, shown in the list of commands. `complete` is called to auto-complete the command arguments, with the current list of arguments as its only argument. It should return a list of relevant values for the last argument in the list. `execute` is called to execute the command, with the command arguments passed as positional arguments. Nr r r r r �get_admin_commandsA r z(IAdminCommandProvider.get_admin_commandsN)r r r r r! r r r r r <