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.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e405a6ffee23cfbd5ceb53397b6fcd818dad7284d2d5b14add8c78e222e3186d |
|
MD5 | cd6af59852b788fb752676d7f8c54ce0 |
|
BLAKE2b-256 | 93341d8ef28419a1c40f64275884b0546ee366e674e5ed19465024f5931e052a |
Close
Hashes for django_comment_migrate-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8539c281fb373c03418f9775994945ef0107c8936b7cb841cbbeb8e7756c2150 |
|
MD5 | 4c8bd0f75c8c1c709d1c8622bef5642a |
|
BLAKE2b-256 | 0a7d3671fdf613d8a4ee5bd652f7bb82ec66026d58d09592b44f0e9c69950d77 |