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.8.tar.gz
(11.2 kB
view details)
Built Distribution
djangodbu-0.0.8-py2-none-any.whl
(12.9 kB
view details)
File details
Details for the file djangodbu-0.0.8.tar.gz
.
File metadata
- Download URL: djangodbu-0.0.8.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7e7f8dcbfad16d088e0be9a97746872b878bd7d8aa40b17dc134c34ba5f8043 |
|
MD5 | a1e005d85ab01a0d14078ebb4e99f945 |
|
BLAKE2b-256 | 1ed2c371207dd17fcf37b4da47fac7acd82b44c56db98d8c113ccd3c6d84acf6 |
File details
Details for the file djangodbu-0.0.8-py2-none-any.whl
.
File metadata
- Download URL: djangodbu-0.0.8-py2-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 780706ae328a8088551b1de69e80c08db44a2b7f576564d004cc17103b0003f9 |
|
MD5 | 94e99aa3a534dd253b3aa2abe8b3bc1f |
|
BLAKE2b-256 | b51ce0c25eacc7f33948596b121ad012bccb3b85a00fcb4d87c6605810a423fc |