request.referrer # 来路 request.headers.get('User-Agent') # 请求头
Django
request.META['HTTP_REFERER'] # 来路 request.META.get("HTTP_USER_AGENT") # 请求头