All Projects → elinaldosoft → ddquery

elinaldosoft / ddquery

Licence: GPL-3.0 License
Django Debug Query (ddquery) beautiful colored SQL statements for logging

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to ddquery

Debuguisystem
Create a runtime menu system with buttons and windows for debugging in one line of code.
Stars: ✭ 48 (+92%)
Mutual labels:  console, debug
consono
The most correct, informative, appealing and configurable variable inspector for JavaScript
Stars: ✭ 17 (-32%)
Mutual labels:  console, debug
Webpack Messages
Beautifully format Webpack messages throughout your bundle lifecycle(s)!
Stars: ✭ 238 (+852%)
Mutual labels:  console, formatter
debug.js
Debugger of JavaScript, by JavaScript, for JavaScript
Stars: ✭ 19 (-24%)
Mutual labels:  console, debug
winston-dev-console
Winston@3 console format aimed to improve development UX
Stars: ✭ 88 (+252%)
Mutual labels:  formatter, debug
unity-rich-text
🌈 Forget about rich text tags pain
Stars: ✭ 14 (-44%)
Mutual labels:  console, debug
vscode-leetcode-cpp-debug
Debug support for LeetCode with C++
Stars: ✭ 14 (-44%)
Mutual labels:  debug
debot
A simple Android library to create Debugging menu
Stars: ✭ 78 (+212%)
Mutual labels:  debug
pretty-remarkable
Plugin for prettifying markdown with https://github.com/jonschlinkert/remarkable using custom renderer rules.
Stars: ✭ 22 (-12%)
Mutual labels:  formatter
objprint
A library that can print Python objects in human readable format
Stars: ✭ 141 (+464%)
Mutual labels:  debug
terminator-cheat-sheet
Cheat Sheet for Terminator
Stars: ✭ 72 (+188%)
Mutual labels:  console
screeps-commander
用于游戏《Screeps》的移动端控制台 WEB 应用
Stars: ✭ 18 (-28%)
Mutual labels:  console
fiction-dl
A content downloader, capable of retrieving works of (fan)fiction from the web and saving them in a few common file formats.
Stars: ✭ 22 (-12%)
Mutual labels:  formatter
ishell
Create shell environments with Python
Stars: ✭ 70 (+180%)
Mutual labels:  console
BlazorMonaco
Blazor component for Microsoft's Monaco Editor which powers Visual Studio Code.
Stars: ✭ 151 (+504%)
Mutual labels:  formatter
cmdr
POSIX-compliant command-line UI (CLI) parser and Hierarchical-configuration operations
Stars: ✭ 94 (+276%)
Mutual labels:  console
nchat
Terminal-based Telegram client for Linux and macOS
Stars: ✭ 68 (+172%)
Mutual labels:  console
iyov
Web proxy for http(s) for developers to analyze data between client and servers based on workerman, especailly for app developers.
Stars: ✭ 27 (+8%)
Mutual labels:  debug
kirai
String formatting library for Java, Android, Web and Unix Terminal
Stars: ✭ 69 (+176%)
Mutual labels:  formatter
toml-sort
Toml sorting library
Stars: ✭ 31 (+24%)
Mutual labels:  formatter

Django Debug Query (ddquery)

Ddquery is a library built in python that add color in your SQL statements and show in your command shell (pretty), for relational databases that uses ORM of the Django

Requirements

  • Python ≥ 3.3
  • Django ≥ 1.8

How to use

pip install ddquery

Add it to your Django Logging settings

You can add it to your Django LOGGING settings:

LOGGING = {
    'version': 1,
    'disable_existing_loggers': False,
    'handlers': {
        'sqlhandler': {
            'level': 'DEBUG',
            'class': 'logging.StreamHandler',
            'formatter': 'sqlformatter'
        }
    },
    'formatters': {
        'sqlformatter': {
            '()': 'ddquery.SqlFormatter',
            'format': '%(levelname)s %(message)s',
        },
    },
    'loggers': {
        'django.db.backends': {
            'handlers': ['sqlhandler'],
            'level': 'DEBUG',
        },
    }
}

Configuration options

'formatters': {
    'sqlformatter': {
        '()': 'sqlformatter.SqlFormatter',
        'format': '%(levelname)s %(message)s',
        'reindent': False,
        'highlight': False,
        'keyword_case': 'lower'
    },
},

How it looks like?

python manage.py runserver

Shell

python manage.py shell

Shell 02

python manage.py migration

Migration

References

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].