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 Distribution

django-sql-comment-0.0.2.tar.gz (2.9 kB view details)

Uploaded Source

Built Distributions

django_sql_comment-0.0.2-py3.6.egg (6.4 kB view details)

Uploaded Source

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

Uploaded Python 3

File details

Details for the file django-sql-comment-0.0.2.tar.gz.

File metadata

  • Download URL: django-sql-comment-0.0.2.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

Hashes for django-sql-comment-0.0.2.tar.gz
Algorithm Hash digest
SHA256 26a4a08d63c75edcfb99271178298be6e50dc02631a361eedce4fb565c7cac6d
MD5 289166088d30a7cffc6db2fb6796a2b8
BLAKE2b-256 afa0e3edb14eab66c77d32ef5b9ce8c823f8bdb4cbf2d3d55559d12b61c7ced9

See more details on using hashes here.

File details

Details for the file django_sql_comment-0.0.2-py3.6.egg.

File metadata

  • Download URL: django_sql_comment-0.0.2-py3.6.egg
  • Upload date:
  • Size: 6.4 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

Hashes for django_sql_comment-0.0.2-py3.6.egg
Algorithm Hash digest
SHA256 471aa50ec5258670420eac3b6017cc2c570ac99c038efba5a22034086784a7a2
MD5 6f06cc5b5db1a6999bda77f083da0594
BLAKE2b-256 8fd6c1968e9e5b962e4ce96ef1203d968ff29a9ca27f3f710a3e03547fe5ee08

See more details on using hashes here.

File details

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

File metadata

  • Download URL: django_sql_comment-0.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 99cef4cd5bfd36261f5c073a2c778370638f9dea9960664aafc7b703ec7b9a4c
MD5 0dfef2d13026283420f7ffd1cc3f0073
BLAKE2b-256 e0289f9488b41d32f849f6bd1ca778bdb69d5a719765523a71fc1c91ca5e6ca1

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