U
    8ÄT_&  ã                   @   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__© ú\/tmp/pip-unpacked-wheel-dv63caxw/django/contrib/staticfiles/management/commands/runserver.pyr      s      þ  þzCommand.add_argumentsc                    s8   t ƒ j||Ž}|d }|d }|r4tjs,|r4t|ƒ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)Zdjango.confr   Z#django.contrib.staticfiles.handlersr   Z)django.core.management.commands.runserverr   ZRunserverCommandr   r   r   r   Ú<module>   s   