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
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.8.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6f12ec0fd8616e2b9faae9554b8e8b47ee092d9d38a0c6141f962f511103bb9 |
|
MD5 | dddb1ad2c768d055d3c167a8715c4d55 |
|
BLAKE2b-256 | a990ce77d98ad92cb26574e6e3793db74014482497397cedc0553174b5ad865f |
Close
Hashes for django_comment_migrate-0.0.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fcc548f1dd4f7d2eee69a82aafe21a1c15d08e82c97530a09043e4f3b07464f4 |
|
MD5 | 980703f4b861e768ab7ded39bb7bc76f |
|
BLAKE2b-256 | a73b1bf94d100db4ed0ca94c5e67256308638b740d598e4930b5adb69c7780da |