Skip to main content

Django management command to generate SQL for applying your models’ and fields’ verbose_name and help_text as PostgreSQL COMMENT statements.

Compatibility

Python 2.7–3.11.

Django 1.11–4.2.

Quickstart

Install Django SQL COMMENT:

pip install django-sql-comment

Add it to your INSTALLED_APPS:

INSTALLED_APPS = (
    ...
    'django_sql_comment',
    ...
)

Run ./manage.py sqlcomment myapp to look at SQL generated, or ./manage.py sqlcomment myapp | ./manage.py dbshell to apply it to your database.

If you’re brave enough to apply the comments automatically on every migration, you can take the risk to add to your AppConfig:

from django.db.models.signals import post_migrate
from django_sql_comment import sqlcomment_post_migrate
...
class MyAppConfig(AppConfig):
    def ready(self):
        post_migrate.connect(sqlcomment_post_migrate)

Metadata

Release files for django-sql-comment 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-sql-comment 1.0.0
File Size Uploaded
django-sql-comment-1.0.0.tar.gz 3.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-sql-comment 1.0.0
File Interpreter ABI Platform
django_sql_comment-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.2 kB

Release files / django-sql-comment-1.0.0.tar.gz

Download URL django-sql-comment-1.0.0.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
2cc76ee99684937f37588e21f8d01c47d76c9e7443e435326fc7c7e96658c469
BLAKE2b-256 checksum
How to use checksums
5325380bf0193b9c3c5ae5404893322d8a91e5c61d3210b1a32133fd2f21122f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.17

Release files / django_sql_comment-1.0.0-py3-none-any.whl

Download URL django_sql_comment-1.0.0-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
781b2d966fcd33ca71bf5002370b61be5bf82606f0ce70de8d43caedd1acdc5e
BLAKE2b-256 checksum
How to use checksums
89e13edbbe8e4fb77a003b1a6e37d2b2e6197799948a29e18217ff1224c509e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.17

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.0.3

2 release files

0.0.2

3 release files

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page