Configuring Django Development Server Output

Can I configure the output from the Django development server to show the IP address of the client making the request?

+3
source share
2 answers

This is on our list for “standard mods” for new releases of Django. 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)
+3
source

Other answers I suggested to me:

+2

Source: https://habr.com/ru/post/1765528/


All Articles