django-rundbg 0.1.3

Creator: bradpython12

Last updated:

Add to Cart

Description:

djangorundbg 0.1.3

django-rundbg=============Provides a lightweight development runserver on Werkzeug with aweb-based debugger with support for REST APIs.Features--------- Friendly for API debugging, like Django Rest Framework.- Werkzeug `web-based debugger <http://werkzeug.pocoo.org/docs/0.11/debug/#using-the-debugger>`__:warning: Be very careful to keep this away from any production environment~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Installation and Configuration------------------------------>From PyPI with pip:: pip install django-rundbgIn your `developmentsettings <https://code.djangoproject.com/wiki/SplitSettings#Multiplesettingfilesimportingfromeachother>`__file add the following::: from yourproject.settings_general import INSTALLED_APPS INSTALLED_APPS = INSTALLED_APPS + ['django_rundbg',] DEBUG = True DEBUG_PROPAGATE_EXCEPTIONS = TrueQuickstart----------After installation and configuration, just run::: python manage.py rundbg --use-linkTo try out, just place an ``assert False`` statement whenever you wantto inspect your code and variables and this will show either at yourcurrent browser window or in the dev console... figure:: https://www.octobot.io/uploads/django-rundbg/chrome-dev-example.png :alt: Chrome Dev Console example Chrome Dev Console exampleInvoking--------After installation and configuration, just run::: python manage.py rundbgSince it extends on Django's ``runserver`` you can pass on the sameparameters than to ``rundbg``::: python manage.py rundbg --no-reload 0.0.0.0:5678Additionally, it supports one additional parameter useful for debuggingXHR requests::: python manage.py rundbg --use-linkThis will show an very simple error 500 page, with a *link* to theWerkzeug Traceback and web-based interactive debugger that you can openin any browser window. The default behaviour for the Werkzeug debuggeris to serve the debugging page to the request that created theexception.Additionally, it supports the following parameters from``runserver_plus``: - ``--reloader-interval 2`` After how many secondsauto-reload should scan for updates in poller-mode. -``--keep-meta-shutdown`` Keep``request.META['werkzeug.server.shutdown']`` function which isautomatically removed because Django debug pages tries to call thefunction and unintentionally shuts down the Werkzeug server.*Werkzeug security PIN is disabled*.Credits-------This project is strongly based upon the work of others: - The `DjangoExtensions <https://github.com/django-extensions/django-extensions>`__``runserver_plus`` is a more comprehensive command than this one. - The`Werkzeug <http://werkzeug.pocoo.org/>`__ server. - `Anothertake <https://github.com/philippbosch/django-werkzeug-debugger-runserver>`__on the same challenge.Authors-------- Juan SaavedraWith :heart: from `Octobot <https://www.octobot.io>`__

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.