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.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6befe14d0327d299638013ee570ea1f59d575bdd1c7391b4dce0834b4e84d077 |
|
MD5 | 4e0cf6225aaff9c93474b6905c117a44 |
|
BLAKE2b-256 | fbed207b840add231f886db28f72135db0a643a3d0d3d98bfd349d40d7f92382 |
Close
Hashes for django_comment_migrate-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7881779777188e95f674d23c275c6f6ccd154dd8367eb237c6d7205a3e22e7a |
|
MD5 | 659d7dd290e4f69edaabd2e285517294 |
|
BLAKE2b-256 | 36f87206b9bcef9590d3693f13d91de4bd94db962f321d2ce889e6845844f314 |