o
    ["<f                     @   s<   d dl Z d dlmZmZ d dlmZ dZG dd deZdS )    N)BaseCommandCommandError)render_to_stringzdashboard.pyc                   @   s"   e Zd ZdZdZdZdddZdS )Commandz_Creates a template file containing the base code to get you started with your custom dashboard.z[file]zapplication nameNc                 K   s   i }t jt  |d< ddg}|d ur|pt}t j|r$td| t j|dd |d< t|d	t
|| td	t j|  d S )
Nprojectzdashboard/dashboard.txtz!grappelli/dashboard/dashboard.txtzfile "%s" already exists.r   filewz"%s" written.)ospathbasenamegetcwdDEFAULT_FILEexistsr   splitopenwriter   printjoin)selfr   optionscontexttpldst r   n/var/www/html/kck/venv/lib/python3.10/site-packages/grappelli/dashboard/management/commands/customdashboard.pyhandle   s   zCommand.handle)N)__name__
__module____qualname__helpargslabelr   r   r   r   r   r      s
    r   )r
   django.core.management.baser   r   django.template.loaderr   r   r   r   r   r   r   <module>   s
   