Skip to main content

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

django_sql_comment-0.0.1-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file django_sql_comment-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: django_sql_comment-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.5 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

Hashes for django_sql_comment-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 20cf05cf14570431cf797fe7b8ee3c1738bb126319262a1c6c21124b485ecc6a
MD5 037331b4644e9102f88fb34eecbc7e72
BLAKE2b-256 218a1dda6be738549b1ef2f4014b786b04cd3d9e13cf940ab700a6068ebd11d1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page