Ask Your Question
0

Dont want to see REST Request and Response messages on a Django Development Server

asked 2015-02-23 08:22:38 -0500

fhussain gravatar image

updated 2015-02-23 08:23:52 -0500

Hi everyone,

I am developing my own dashboard in Horizon. For this, I am running a Django develpoment server on my localhost.

./runtests.sh --runserver 0.0.0.0:9000

I have used various debugging checks in the code, whose output I print to see how the code behaves. They are being displayed perfectly well. The problem is that huge REST responses and request are also dumped on the screen, which are not required and make it difficult to scroll to the desired variables printed.

Is there any option in to adjust Django settings such that it does not dump the REST response and requests on the screen unwantedly?

Thanks.

Fizza Hussain

edit retag flag offensive close merge delete

Comments

logging in python is v.easy pls see this

Syed Awais Ali gravatar imageSyed Awais Ali ( 2015-02-23 08:53:05 -0500 )edit

1 answer

Sort by » oldest newest most voted
0

answered 2015-02-23 08:52:18 -0500

I don't think there is way to exclude those req/resp. If the server is running on any port it will print all the req/resp that app will be making. You should use logger functionality in python to get rid of those req/resp and only log the messages that would help you in debugging the flow of code.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-02-23 08:22:38 -0500

Seen: 142 times

Last updated: Feb 23 '15