How to Access Static file logs inside an view in Django

时间:2018-03-25 18:48:59

标签: python django file logging static

I want to log every Static Files request and the request IP address in Django.

In Console I am able to check the Static File Log, But I want access those logs inside an Django View with IP address of the request

Can Suggest an solution or any work around.

I am planning to server static files manually and perform logging.

1 个答案:

答案 0 :(得分:0)

Solved, I Created an view to serve static files manually using Django in-built 'serve' method, In which I get the IP Address of the Request using meta data of the Request