î
ªÍ Xi  ã               @   sJ   d  d l  m Z d  d l m Z d  d l m Z Gd d „  d e ƒ Z d S)é    )Úsettings)ÚStaticFilesHandler)ÚCommandc                   s:   e  Z d  Z d Z ‡  f d d †  Z ‡  f d d †  Z ‡  S)r   zMStarts a lightweight Web server for development and also serves static files.c          
      sd   t  t |  ƒ j | ƒ | j d d d d d d d d d	 ƒ| j d
 d d d d d d d d ƒd  S)Nz
--nostaticÚactionÚstore_falseÚdestÚuse_static_handlerÚdefaultTÚhelpzCTells Django to NOT automatically serve static files at STATIC_URL.z
--insecureÚ
store_trueÚinsecure_servingFz3Allows serving static files even if DEBUG is False.)Úsuperr   Úadd_argumentsÚadd_argument)ÚselfÚparser)Ú	__class__© úf/home/ubuntu/projects/ifolica/build/django/django/contrib/staticfiles/management/commands/runserver.pyr   
   s    zCommand.add_argumentsc                sR   t  t |  ƒ j | | Ž  } | d } | d } | rN t j sD | rN t | ƒ S| S)z¶
        Returns the static files serving handler wrapping the default handler,
        if static files should be served. Otherwise just returns the default
        handler.
        r   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   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   