o
    uvXj&  ã                   @   s8   d dl mZ d dlmZ d dlmZ G dd„ deƒZdS )é    )Úsettings)ÚStaticFilesHandler)ÚCommandc                       s,   e Zd ZdZ‡ fdd„Z‡ fdd„Z‡  ZS )r   zMStarts a lightweight Web server for development and also serves static files.c                    s4   t ƒ  |¡ |jddddd� |jdddd	d� d S )
Nz
--nostaticÚstore_falseÚuse_static_handlerzCTells Django to NOT automatically serve static files at STATIC_URL.)ÚactionÚdestÚhelpz
--insecureÚ
store_trueÚinsecure_servingz3Allows serving static files even if DEBUG is False.)ÚsuperÚadd_argumentsÚadd_argument)ÚselfÚparser©Ú	__class__© úu/var/www/html/myproject/venv/lib/python3.10/site-packages/django/contrib/staticfiles/management/commands/runserver.pyr      s   þ
þzCommand.add_argumentsc                    s<   t ƒ j|i |¤Ž}|d }|d }|rtjs|rt|ƒS |S )z§
        Return the static files serving handler wrapping the default handler,
        if static files should be served. Otherwise return the default handler.
        r   r   )r   Úget_handlerr   ÚDEBUGr   )r   ÚargsÚoptionsÚhandlerr   r   r   r   r   r      s   zCommand.get_handler)Ú__name__Ú
__module__Ú__qualname__r	   r   r   Ú__classcell__r   r   r   r   r      s    r   N)Údjango.confr   Ú#django.contrib.staticfiles.handlersr   Ú)django.core.management.commands.runserverr   ÚRunserverCommandr   r   r   r   Ú<module>   s    