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
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
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.0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc366236e5abec22c28d3f45862925f37af036bc47ae1397a8bc2d58601f6f9c |
|
MD5 | 6d2f6875daf646eb29dddaa5a1a6a152 |
|
BLAKE2b-256 | 209cc40f9d62e15c9ea70e0b5d8b1afe3ab60df477fbc984833a05dc2d5bb6e4 |
Close
Hashes for django_comment_migrate-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2a4c57532b225d15b6903cddd1f60f26b5cc7cd63e90171887a0bab377a939d |
|
MD5 | 8b806a3c7a53a97f23c5bcdf00204493 |
|
BLAKE2b-256 | e89b139d87c663fba87b746a62f8eaec743e2db45604a343bf47f307a438c469 |