Django management command to generate SQL for applying your models' verbose name and help_text as PostgreSQL COMMENTs
Project description
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)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django-sql-comment-1.0.0.tar.gz
.
File metadata
- Download URL: django-sql-comment-1.0.0.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cc76ee99684937f37588e21f8d01c47d76c9e7443e435326fc7c7e96658c469 |
|
MD5 | 2633f9a0e11d4fb2a0543415f2c55319 |
|
BLAKE2b-256 | 5325380bf0193b9c3c5ae5404893322d8a91e5c61d3210b1a32133fd2f21122f |
File details
Details for the file django_sql_comment-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: django_sql_comment-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 781b2d966fcd33ca71bf5002370b61be5bf82606f0ce70de8d43caedd1acdc5e |
|
MD5 | 41364543b7afa552f8b5caa56fbc34ad |
|
BLAKE2b-256 | 89e13edbbe8e4fb77a003b1a6e37d2b2e6197799948a29e18217ff1224c509e2 |