Skip to main content

Tools for debugging Django

Project description

# djangodbu
Tools for debugging Django

Currently there is one helper routine to print out django model instances to console, intended to be used in django shell/shell_plus.

The output contains attributes and values with their type information.

## Project url

[djangodbu on github](https://github.com/mulderns/djangodbu)

## Installation

$ pip install djangodbu

## Usage

Start Django shell_plus: `python manage.py shell_plus`

>>> from djangodbu.shell import dorm
>>> dorm(MyModel.objects.get(id=123))

will produce colorized output:

instancemethod serializable_value
instancemethod set_password
instancemethod set_unusable_password
instancemethod unique_error_message
instancemethod validate_unique
unicode USERNAME_FIELD: username
unicode email: some.one@example.org
unicode first_name: Some
unicode last_name: One
unicode password: pbkdf2_sha256$20000$
unicode username: someone
list REQUIRED_FIELDS: 1
long id: 10780
long pk: 10780
so.mo.na.AccountingUser accountinguser: 651 > 'Some One'
RelatedManager additionalemail_set: 1
RelatedManager callback_set: 0
RelatedManager campaigncode_set: 0
RelatedManager grouplog: 142
ManyRelatedManager groups: 0
RelatedManager log: 379
RelatedManager logevent_set: 89
RelatedManager message_set: 11
lo.pa.to.Payment payment: 510 > 'Bob & Uncle'
RelatedManager settings_set: 1
RelatedManager social_auth: 0
ManyRelatedManager user_permissions: 0
RelatedManager worker_set: 1
NoneType activationcode
NoneType auth_token
NoneType employee
bool is_active: True
bool is_superuser: False
datetime.datetime date_joined: 2016-05-01 08:13:16+00:00
datetime.datetime last_login: 2016-06-20 07:48:51+00:00
type DoesNotExist: DoesNotExist
classobj Meta: Meta
type MultipleObjectsReturned: MultipleObjectsReturned


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

djangodbu-0.0.6.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

djangodbu-0.0.6-py2-none-any.whl (11.4 kB view details)

Uploaded Python 2

File details

Details for the file djangodbu-0.0.6.tar.gz.

File metadata

  • Download URL: djangodbu-0.0.6.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for djangodbu-0.0.6.tar.gz
Algorithm Hash digest
SHA256 0d71a63dd5344a601bec8bc98274b489d81468f339c5fa254ba1f068903fcc67
MD5 b85cc2a702624f152c3f7bbb5d3cd93a
BLAKE2b-256 360651468ce665fc7dd8b4303c8ee95a472adfb9addc1d31db1fee8f728a8d81

See more details on using hashes here.

File details

Details for the file djangodbu-0.0.6-py2-none-any.whl.

File metadata

File hashes

Hashes for djangodbu-0.0.6-py2-none-any.whl
Algorithm Hash digest
SHA256 54a438576ee556036253fda0fbb2f84592d392b918e4c7c31326b44f83033523
MD5 e90951332b4e955753748e445c312a11
BLAKE2b-256 8ac69bc4ad286eb27079200520cba83ba534d2d174ff7d5eb1536faeba5cd853

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