o
    {,h]                     @   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__ n/var/www/html/rh/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    