{ "info": { "author": "Tristram Oaten and Tom Christie", "author_email": "tris@blackgateresearch.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Framework :: Django", "Intended Audience :: Developers", "License :: Public Domain", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4" ], "description": "FORK!\n-----\n\nThis is used in exactly the same way as the upstream fork, but it uses the MAGNIFICENT pudb library (https://github.com/inducer/pudb) to do postmortem.\n\n------------------\n\n\n**Status**: I no longer actively use this project, and am only accepting bugfixes and django compatibility pull requests.\n\nDjango PDB\n==========\n\nMake debugging Django easier\n----------------------------\n\nAdding ``pdb.set_trace()`` to your source files every time you want to break into pdb sucks.\n\nDon't do that.\n\nDo this.\n\nInstallation\n------------\n\nInstall using pip::\n\n pip install django-pdb\n\nAdd it to your settings.py.\n\nFor Django before 1.7 it needs to be added AFTER any apps that override the\n`runserver` or `test` commands (includes south and django.contrib.staticfiles).\n\nFor Django after 1.7 it needs to be added BEFORE them.\n\n.. code:: python\n\n # Order is important and depends on your Django version.\n # With Django 1.7+ put it towards the beginning, otherwise towards the end.\n INSTALLED_APPS = (\n ...\n 'django_pdb',\n ...\n )\n\n # Make sure to add PdbMiddleware after all other middleware.\n # PdbMiddleware only activates when settings.DEBUG is True.\n MIDDLEWARE_CLASSES = (\n ...\n 'django_pdb.middleware.PdbMiddleware',\n )\n\nUsage\n-----\n\n``manage.py runserver``\n\nDrops into pdb at the start of a view if the URL includes a `pdb` GET parameter.\n\nDrops into ipdb at the start of a view if the URL includes a `ipdb` GET parameter.\n\nThis behavior is only enabled if ``settings.DEBUG = True``::\n\n bash: testproject/manage.py runserver\n Validating models...\n\n 0 errors found\n Django version 1.3, using settings 'testproject.settings'\n Development server is running at http://127.0.0.1:8000/\n Quit the server with CONTROL-C.\n\n GET /test?pdb\n function \"myview\" in testapp/views.py:7\n args: ()\n kwargs: {}\n\n > /Users/tom/github/django-pdb/testproject/testapp/views.py(8)myview()\n -> a = 1\n (Pdb)\n\n``manage.py runserver --pdb`` **or** ``manage.py runserver --ipdb``\n\nDrops into pdb/ipdb at the start of every view::\n\n bash: testproject/manage.py runserver --pdb\n Validating models...\n\n 0 errors found\n Django version 1.3, using settings 'testproject.settings'\n Development server is running at http://127.0.0.1:8000/\n Quit the server with CONTROL-C.\n\n GET /test\n function \"myview\" in testapp/views.py:7\n args: ()\n kwargs: {}\n\n > /Users/tom/github/django-pdb/testproject/testapp/views.py(7)myview()\n -> a = 1\n (Pdb)\n\n\n``manage.py test --pdb`` **or** ``manage.py test --ipdb``\n\nDrops into pdb/ipdb on test errors/failures::\n\n bash: testproject/manage.py test testapp --pdb\n Creating test database for alias 'default'...\n E\n ======================================================================\n >>> test_error (testapp.tests.SimpleTest)\n ----------------------------------------------------------------------\n Traceback (most recent call last):\n File \"/Users/tom/github/django-pdb/testproject/testapp/tests.py\", line 16, in test_error\n one_plus_one = four\n NameError: global name 'four' is not defined\n ======================================================================\n\n > /Users/tom/github/django-pdb/testproject/testapp/tests.py(16)test_error()\n -> one_plus_one = four\n (Pdb)\n\n\nPost mortem mode\n----------------\n\n``manage.py runserver --pm``\n\nPost mortem mode, drops into (i)pdb if an exception is raised in a view. This works only if there is\nno other app overriding ``runserver`` command.\n\n``POST_MORTEM = True``\n\nYou can also add ```POST_MORTEM = True``` to your ```settings.py``` to enable this option even if other app overrides ```runserver```.\n\nFilter\n------\n\nYou can also use the template filter ``pdb`` or ``ipdb`` to explore a template variable in (i)pdb this way::\n\n {% load pdb %}\n\n {{ variable|pdb }}\n {{ variable|ipdb }}\n {{ variable|ipdb|a_filter_to_debug }}\n\nExample::\n\n bash: testproject/manage.py runserver\n Validating models...\n\n 0 errors found\n Django version 1.4, using settings 'testproject.settings'\n Development server is running at http://127.0.0.1:8000/\n Quit the server with CONTROL-C.\n > /Users/tom/github/django-pdb/django_pdb/templatetags/pdb_filters.py(14)pdb()\n -> return element\n (Pdb) element\n \"I'm the variable\"\n (Pdb) element = \"another value\"\n (Pdb) c\n [11/May/2012 11:22:53] \"GET /filter/ HTTP/1.1\" 200 37\n\nThis is useful to inspect a complex object that isn't behaving as expected or debug a filter.\n\nOther apps that override ``test``/``runserver``\n-----------------------------------------------\n\n``manage.py test --pdb`` works if you also have other apps that\noverride the ``test`` command, as long as they use Python's unittest\nframework.\n\nMake sure to put ``django_pdb`` **after** any conflicting apps in\n``INSTALLED_APPS`` so that they have priority.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/0atman/django-pudb", "keywords": null, "license": "Public Domain", "maintainer": null, "maintainer_email": null, "name": "django-pdb-pudb", "package_url": "https://pypi.org/project/django-pdb-pudb/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-pdb-pudb/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/0atman/django-pudb" }, "release_url": "https://pypi.org/project/django-pdb-pudb/0.0.1/", "requires_dist": null, "requires_python": null, "summary": "Easier pudb debugging for Django. Fork of django-pdb by Tom Christie.", "version": "0.0.1" }, "last_serial": 1899470, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "3f47bcb45641a293a4f2c90e238c086b", "sha256": "e95b9fab36fed0f6ccfc7d7689194f10629808f927ee26a23919dedc75d75894" }, "downloads": -1, "filename": "django-pdb-pudb-0.0.1.tar.gz", "has_sig": false, "md5_digest": "3f47bcb45641a293a4f2c90e238c086b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7661, "upload_time": "2016-01-11T17:53:21", "url": "https://files.pythonhosted.org/packages/ae/bc/739ebe66393763cf4687c55d6cc2a3f6b0b5c7336cb9b7a39ecc16c7c968/django-pdb-pudb-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3f47bcb45641a293a4f2c90e238c086b", "sha256": "e95b9fab36fed0f6ccfc7d7689194f10629808f927ee26a23919dedc75d75894" }, "downloads": -1, "filename": "django-pdb-pudb-0.0.1.tar.gz", "has_sig": false, "md5_digest": "3f47bcb45641a293a4f2c90e238c086b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7661, "upload_time": "2016-01-11T17:53:21", "url": "https://files.pythonhosted.org/packages/ae/bc/739ebe66393763cf4687c55d6cc2a3f6b0b5c7336cb9b7a39ecc16c7c968/django-pdb-pudb-0.0.1.tar.gz" } ] }