标签:
get path of basehttp.py
$ python >>> import site >>> site.getsitepackages() [‘/usr/lib64/python2.7/site-packages‘, ‘/usr/lib/python2.7/site-packages‘, ‘/usr/lib/site-python‘]
change log_message() msg = "[%s] %s\n" % (self.log_date_time_string(), format % args) to the following
msg = "[%s] (%s)" % (self.log_date_time_string(), self.client_address[0])
makes you looks like this
[09/Jan/2016 15:55:37] (127.0.0.1) "POST /m HTTP/1.0" 200 59
Django runserver show client ip
标签:
原文地址:http://www.cnblogs.com/exclm/p/5116623.html