def staff_member_required(view_func):
    """
    Decorator for views that checks that the user is logged in and is a staff
    member, displaying the login page if necessary.
    """

@wraps(view_func)
def _checklogin(request, *args, **kwargs):
    pass
How to set django upload_handler in admin?