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
Close
Hashes for django_sql_comment-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 781b2d966fcd33ca71bf5002370b61be5bf82606f0ce70de8d43caedd1acdc5e |
|
MD5 | 41364543b7afa552f8b5caa56fbc34ad |
|
BLAKE2b-256 | 89e13edbbe8e4fb77a003b1a6e37d2b2e6197799948a29e18217ff1224c509e2 |