Skip to main content

Simple and useful django middleware for real-time logging.

Project description

django-watch

Light and useful django middleware for real-time logging in development.

https://github.com/Sobolev5/django-watch

How to use it

To install run:

pip install django-watch

Add the following lines at the end of settings.py file:

if DEBUG:
    INSTALLED_APPS = INSTALLED_APPS + ('django_watch',)
    MIDDLEWARE = ( MIDDLEWARE + ('django_watch.middleware.WatchMiddleware',) )  

Open your development console and see the result:

| START GET /profiles/views.py |  todo_list_view  Line number 1934
| request.GET: <QueryDict: {'a': ['b']}>
| Exception
| TRACEBACK:
Traceback (most recent call last):
  File "handlers/base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/profiles/decorators.py", line 158, in inner_decorator
    return function(request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/main/decorators.py", line 111, in wrapper
    response = func(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^
  File "/userprofiles/views.py", line 1991, in todo_list_view
    print(undef)
          ^^^^^^
NameError: name 'undef' is not defined

TODO

typing
__doc__ strings

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_watch-0.5.2-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file django_watch-0.5.2-py3-none-any.whl.

File metadata

  • Download URL: django_watch-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.2

File hashes

Hashes for django_watch-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 75ed24dd8a992f4f49c8ff8b0a7166982a90d0ad5d73e5cd6e3cb2f8f74f0528
MD5 4d4e5b8e9e5442291b73df71ffd78179
BLAKE2b-256 a84942fbd193b40080e1f516a0bc7feae3ed6b7889c32e8fcc8e54ea06c72c38

See more details on using hashes here.

Supported by

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