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.
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for django_sql_comment-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20cf05cf14570431cf797fe7b8ee3c1738bb126319262a1c6c21124b485ecc6a |
|
MD5 | 037331b4644e9102f88fb34eecbc7e72 |
|
BLAKE2b-256 | 218a1dda6be738549b1ef2f4014b786b04cd3d9e13cf940ab700a6068ebd11d1 |