|
Project Information
|
The basic idea is to be able to view debugging infomation for a single user in production As you know most of the django real life appliaction runnning on apache server. in a production you do not want to log debug information to a file and you also want to debug infomation to a specific user. So the middleware basic idea is to detect a pre defined useranegt or a list of IP's that will enable the output of debug information that was set in the "views" and append this data to the html page that is generated. And you just need to view source in the browser. Install
How to use it
Configure ( in django settings.py file)
DEBUG_USER_AGENT = 'My Site Debug UserAgent' DEBUG_IP_LIST = ('127.0.0.1','192.168.2.108')def my_rendering_method(debug_info=None):
if debug_info == None: return ''
return '<!-- Debug Info '+str(debug_info) + ' -->'
RENDERING_METHOD = my_rendering_methodHow to change UserAgent
|