Skip to main content

Quieter runserver for Django

Project description

A quieter version of the default Django runserver.

The default runserver prints out a lot of information, and not all of it is useful. This packages removes most of the information printed, leaving only the important stuff:

  • Requests to some static assets are not logged

  • 304 Not Modified requests are not logged

  • Timestamps are no longer included. Most of the time, these are noise

  • The common response types GET and POST are abbreviated to G and P

  • GET query strings are logged on a separate, slightly indented line, allowing for easy differentiation.

Example:

200 G /
200 G /static/styles.css
200 G /search/
  ?q=foo&sort=date
200 G /item/123/
301 P /item/123/
200 G /item/123/

Installing

Install this package:

pip install djangoquietrunserver

Include it in your INSTALLED_APPS:

INSTALLED_APPS += (
    'djangoquietrunserver',
)

Using

Use runserver-- instead of runserver:

python manage.py runserver--

Monkey patching

If you do not want to use runserver--, you can monkey patch Django so that the default runserver will use the quieter logging by adding the following lines to your manage.py, just after the import sys line:

import djangoquietrunserver.monkeypatch
djangoquietrunserver.monkeypatch()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-quiet-runserver-0.1.0.tar.gz (3.1 kB view details)

Uploaded Source

File details

Details for the file django-quiet-runserver-0.1.0.tar.gz.

File metadata

File hashes

Hashes for django-quiet-runserver-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2af32cacf44b044a9866bb378483002573b827e546672024b39f0e28009fcb0a
MD5 8af3fee2e0c6616e4b50c726de84ab4c
BLAKE2b-256 b695bc56eb825bb7cc85d4ea803f406cb3c9717d4ca7d81378ed8f7880c0b84e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page