B
    £0H[’  ã               @   s,   d dl mZ d dlmZ dedfdd„ZdS )é    )ÚREDIRECT_FIELD_NAME)Úuser_passes_testNzadmin:loginc             C   s"   t dd„ ||d�}| r|| ƒS |S )z‹
    Decorator for views that checks that the user is logged in and is a staff
    member, redirecting to the login page if necessary.
    c             S   s   | j o
| jS )N)Z	is_activeZis_staff)Úu© r   úiC:\Users\HIRONO~1\AppData\Local\Temp\pip-install-6bm3nxem\django\django\contrib\admin\views\decorators.pyÚ<lambda>   s    z'staff_member_required.<locals>.<lambda>)Ú	login_urlÚredirect_field_name)r   )Z	view_funcr	   r   Zactual_decoratorr   r   r   Ústaff_member_required   s    r
   )Zdjango.contrib.authr   Zdjango.contrib.auth.decoratorsr   r
   r   r   r   r   Ú<module>   s   