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
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
Release history Release notifications | RSS feed
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.7.tar.gz
(11.2 kB
view details)
Built Distribution
djangodbu-0.0.7-py2-none-any.whl
(13.1 kB
view details)
File details
Details for the file djangodbu-0.0.7.tar.gz
.
File metadata
- Download URL: djangodbu-0.0.7.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b17e7234873c80db2d0a1b8d4ba8d03167e567d07a9583d70629a9950d8d0fbc |
|
MD5 | 337ba12938bb2ea306143d4355d8a70c |
|
BLAKE2b-256 | 77617724db1fdf4dde4072100bf714037256a5e604272e63f46723ad16f481ac |
File details
Details for the file djangodbu-0.0.7-py2-none-any.whl
.
File metadata
- Download URL: djangodbu-0.0.7-py2-none-any.whl
- Upload date:
- Size: 13.1 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d9e6e5761eb6f09b662a9cccb9b3e381c275369653a3e917e5aa580b31b051f |
|
MD5 | 03c3a1606782eea0e9065d031e718fed |
|
BLAKE2b-256 | f29f25c5a78386514f4c2dcb26f46954f92dd60b19e04e93154044a93b1b0b3e |