Django SQL COMMENT
==================
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)
Raw data
{
"_id": null,
"home_page": "https://github.com/tuffnatty/django-sql-comment",
"name": "django-sql-comment",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "django-sql-comment",
"author": "Phil Krylov",
"author_email": "phil.krylov@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/53/25/380bf0193b9c3c5ae5404893322d8a91e5c61d3210b1a32133fd2f21122f/django-sql-comment-1.0.0.tar.gz",
"platform": null,
"description": "Django SQL COMMENT\n==================\n\nDjango management command to generate SQL for applying your models' and fields' ``verbose_name`` and ``help_text`` as PostgreSQL ``COMMENT`` statements.\n\nCompatibility\n-------------\n\nPython 2.7\u20133.11.\n\nDjango 1.11\u20134.2.\n\nQuickstart\n----------\n\nInstall Django SQL COMMENT::\n\n pip install django-sql-comment\n\nAdd it to your ``INSTALLED_APPS``::\n\n INSTALLED_APPS = (\n ...\n 'django_sql_comment',\n ...\n )\n\nRun ``./manage.py sqlcomment myapp`` to look at SQL generated, or ``./manage.py sqlcomment myapp | ./manage.py dbshell`` to apply it to your database.\n\nIf you're brave enough to apply the comments automatically on every migration, you can take the risk to add to your ``AppConfig``::\n\n from django.db.models.signals import post_migrate\n from django_sql_comment import sqlcomment_post_migrate\n ...\n class MyAppConfig(AppConfig):\n def ready(self):\n post_migrate.connect(sqlcomment_post_migrate)\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Django management command to generate SQL for applying your models' verbose name and help_text as PostgreSQL COMMENTs",
"version": "1.0.0",
"project_urls": {
"Homepage": "https://github.com/tuffnatty/django-sql-comment"
},
"split_keywords": [
"django-sql-comment"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "89e13edbbe8e4fb77a003b1a6e37d2b2e6197799948a29e18217ff1224c509e2",
"md5": "41364543b7afa552f8b5caa56fbc34ad",
"sha256": "781b2d966fcd33ca71bf5002370b61be5bf82606f0ce70de8d43caedd1acdc5e"
},
"downloads": -1,
"filename": "django_sql_comment-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "41364543b7afa552f8b5caa56fbc34ad",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 3782,
"upload_time": "2023-08-06T17:03:50",
"upload_time_iso_8601": "2023-08-06T17:03:50.899636Z",
"url": "https://files.pythonhosted.org/packages/89/e1/3edbbe8e4fb77a003b1a6e37d2b2e6197799948a29e18217ff1224c509e2/django_sql_comment-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5325380bf0193b9c3c5ae5404893322d8a91e5c61d3210b1a32133fd2f21122f",
"md5": "2633f9a0e11d4fb2a0543415f2c55319",
"sha256": "2cc76ee99684937f37588e21f8d01c47d76c9e7443e435326fc7c7e96658c469"
},
"downloads": -1,
"filename": "django-sql-comment-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "2633f9a0e11d4fb2a0543415f2c55319",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3397,
"upload_time": "2023-08-06T17:03:51",
"upload_time_iso_8601": "2023-08-06T17:03:51.746692Z",
"url": "https://files.pythonhosted.org/packages/53/25/380bf0193b9c3c5ae5404893322d8a91e5c61d3210b1a32133fd2f21122f/django-sql-comment-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-06 17:03:51",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "tuffnatty",
"github_project": "django-sql-comment",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "django-sql-comment"
}