{"id":21395149,"url":"https://github.com/gabrielhora/django_sqlformatter","last_synced_at":"2025-07-13T18:33:10.778Z","repository":{"id":57422122,"uuid":"123795623","full_name":"gabrielhora/django_sqlformatter","owner":"gabrielhora","description":"Format and syntax highlight SQL queries in Django log","archived":false,"fork":false,"pushed_at":"2018-03-04T20:03:53.000Z","size":321,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-05T01:35:27.782Z","etag":null,"topics":["django","logging","sql"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gabrielhora.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-04T14:18:28.000Z","updated_at":"2020-04-05T20:20:27.000Z","dependencies_parsed_at":"2022-09-06T14:01:45.703Z","dependency_job_id":null,"html_url":"https://github.com/gabrielhora/django_sqlformatter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrielhora%2Fdjango_sqlformatter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrielhora%2Fdjango_sqlformatter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrielhora%2Fdjango_sqlformatter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrielhora%2Fdjango_sqlformatter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gabrielhora","download_url":"https://codeload.github.com/gabrielhora/django_sqlformatter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225909035,"owners_count":17543521,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["django","logging","sql"],"created_at":"2024-11-22T14:18:26.598Z","updated_at":"2024-11-22T14:18:27.315Z","avatar_url":"https://github.com/gabrielhora.png","language":"Python","readme":"# Django SQL Formatter\n\nFormat (sqlparse) and syntax highlight (pygments) SQL queries in Django.\n\n#### Install\n\n    pip install django-sqlformatter\n\n#### Configure\n\n```python\nLOGGING = {\n    'version': 1,\n    'disable_existing_loggers': False,\n    'formatters': {\n        'sql': {\n            '()': 'django_sqlformatter.SqlFormatter',\n        },\n    },\n    'handlers': {\n        'console': {\n            'level': 'DEBUG',\n            'class': 'logging.StreamHandler',\n            'formatter': 'sql',\n        },\n    },\n    'loggers': {\n        'django.db.backends': {\n            'handlers': ['console'],\n            'level': 'DEBUG',\n        }\n    }\n}\n```\n\n---\n\n#### Before\n\n![before](before.png)\n\n#### After\n\n![after](after.png)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabrielhora%2Fdjango_sqlformatter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgabrielhora%2Fdjango_sqlformatter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabrielhora%2Fdjango_sqlformatter/lists"}