An app that provides Django model comment migration
Project description
An app that provides Django model comment migration
English | 简体中文
Feature
Automatic migration model help_text to comment
Provide a command to migrate the comment of the specified app
Examples
download python package:
pip install django-comment-migrate
add django_comment_migrate app
project/project/settings.py
INSTALLED_APPS =[ "django_comment_migrate", ... ]
add model
project/app/model.py
from django.db import models class CommentModel(models.Model): no_comment = models.TextField() aaa = models.IntegerField(default=0, help_text="test default") help_text = models.CharField(max_length=40, help_text="this is help text") class Meta: app_label = 'tests' db_table = 'comment_model'
execute database migrate:
python manage.py makemigrations python manage.py migrate
Now check the database table, comments have been generated.
Command
Provides a comment migration command, which allows the database to regenerate comments:
python manage.py migratecomment [app_label]
The command needs to be executed after all migrations are executed
Running the tests
Install Tox:
pip install tox
Run:
tox
Supported Database
MySQL
Postgres
Microsoft SQL Server
Project details
Release history Release notifications | RSS feed
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
Close
Hashes for django-comment-migrate-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 204e55c9fa56fd1632097a75fda5293c6e8914c954195d760ade6b0e1f7e8e5d |
|
MD5 | e6e22c26154073d07c9f3fd0e355eead |
|
BLAKE2b-256 | a65f7970fdbcbbafceded13abee939ad05ae7788150279afbfb03f8fa2bf6fa5 |
Close
Hashes for django_comment_migrate-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f69114c832dd60f846727f6bb6cc2f4563a556ec19f33b0046cf13bf2a9b6dc |
|
MD5 | 9aeedabc03359cd625e44cde7f97ad0a |
|
BLAKE2b-256 | 6b6316b9f70f65edd396f63c50f4bae1dfa93a901dc95b1e78c2aad9e29ce970 |