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
shell script 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
shell script 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
shell script python manage.py migratecomment
The command needs to be executed after all migrations are executed
Running the tests
Install Tox
shell script pip install tox
Run
shell script 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
Hashes for django-comment-migrate-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76ab055314b83bd8cbe57cb78ee0e8d0acf8b6acaf36471f9dd2cd4da85ec617 |
|
MD5 | 886e950fc61d774527b181299d2ad1ec |
|
BLAKE2b-256 | b7cbf6dc5673b6ed5439fc0480ff9e10cef79accaa8a4efd87e05683c7e34f76 |
Hashes for django_comment_migrate-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b19778075c7adcb4fdd06720e64b5eca42e85d2127e4fd9358d809b8227cce9 |
|
MD5 | e0a1237d438f278a5a4ea3e376c71635 |
|
BLAKE2b-256 | f557642e8bc8c9aa57c7de689dd3d2f7e6d09a8e2e3fc2f13a6c8df0602e5e45 |