3
­©Þ[Š  ã               @   s8   d dl mZ d dlmZ d dlmZ G dd„ deƒZdS )é    )Úimport_module)Úsettings)ÚBaseCommandc               @   s   e Zd ZdZdd„ ZdS )ÚCommandzqCan be run as a cronjob or directly to clean out expired sessions (only with the database backend at the moment).c             K   sD   t tjƒ}y|jjƒ  W n& tk
r>   | jjdtj ƒ Y nX d S )Nz?Session engine '%s' doesn't support clearing expired sessions.
)r   r   ZSESSION_ENGINEZSessionStoreZclear_expiredÚNotImplementedErrorÚstderrÚwrite)ÚselfÚoptionsZengine© r   ú]/tmp/pip-install-j7i95hgp/django/django/contrib/sessions/management/commands/clearsessions.pyÚhandle   s    
zCommand.handleN)Ú__name__Ú
__module__Ú__qualname__Úhelpr   r   r   r   r   r      s   r   N)Ú	importlibr   Zdjango.confr   Zdjango.core.management.baser   r   r   r   r   r   Ú<module>   s   