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 Distribution
Built Distribution
File details
Details for the file django-sql-comment-0.0.3.tar.gz
.
File metadata
- Download URL: django-sql-comment-0.0.3.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 PyPy/7.3.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 238fb9624252f8e471a166398f48b3f590cf3cbc75450b8234634a35144b5514 |
|
MD5 | ac63eac2e679e5b62ed5dec0c4c73cc5 |
|
BLAKE2b-256 | 9a178ea58106a7acee54d4a767282613c1b650d772432f011f318ac2c734bd58 |
File details
Details for the file django_sql_comment-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: django_sql_comment-0.0.3-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 PyPy/7.3.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e46d28d0215616ef1d9b0777d20d243e7a485639022705006fd096183951ece3 |
|
MD5 | 4e4af28408b55a2637fa0037f8646f46 |
|
BLAKE2b-256 | 0dd95200350cf2f5d5c17a99d9182eb2507eaf185128b9cee7c937ad7dd16202 |