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)
| File | Size | Uploaded | |
|---|---|---|---|
| django-sql-comment-1.0.0.tar.gz | 3.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|