Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django manage.py runserver verbosity

Tags:

django

Is there a way to make the runserver command completely quiet or just display errors like 404 or 500 ?? verbosity option has no effect on it...

like image 836
greg Avatar asked Jan 21 '11 01:01

greg


People also ask

What is verbosity in Django?

Use --verbosity , where it is supported, to specify the amount of notification and debug information that django-admin prints to the console.

Why does python manage py Runserver not work?

The site could be temporarily unavailable or too busy. Try again in a few moments. If you are unable to load any pages, check your computer's network connection. If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.

What does manage py do in Django?

manage.py : A command-line utility that lets you interact with this Django project in various ways. You can read all the details about manage.py in django-admin and manage.py. The inner mysite/ directory is the actual Python package for your project.


2 Answers

There is no way to make the command less verbose with options. You can however pipe the output someplace where you don't need to care about it. On Linux/OS X/*nix you can pipe the output to /dev/null with something like:

$ ./manage.py runserver > /dev/null

The equivalent on windows would be something like:

python manage.py runserver > NUL

One last note: If you are seeking to suppress the output as a matter of preference in your development environment, awesome! This should work for you. If you are seeking to do this for almost any other reason, it's probably a sign that you are using the dev server for something which you shouldn't. "./manage.py runserver" should never be used for anything other than local development.

like image 129
SeanOC Avatar answered Sep 18 '22 15:09

SeanOC


You can now set the verbosity with the verbosity flag:

./manage.py runserver --verbosity 0

Documentation

like image 41
Erowlin Avatar answered Sep 19 '22 15:09

Erowlin