Reputation: 3817
Is it possible to configure the output from the Django development server to show the IP address of the client making the request?
Upvotes: 3
Views: 736
Reputation: 3817
Other answers I've had suggested to me:
Upvotes: 2
Reputation: 17713
This in our list for "standard mods" to new Django releases. For Django 1.2.1, in django/core/servers/basehttp.py, line 614, change:
msg = "[%s] %s\n" % (self.log_date_time_string(), format % args)
to
msg = "[%s] %s %s\n" % (self.log_date_time_string(),
self.client_address[0], format % args)
Upvotes: 3