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.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cfcd251bd9953eb86815c12bf915a007244381c14d9a459d75ddc1c99f15f3a |
|
MD5 | 2e903959e1b669039153faf592d119b8 |
|
BLAKE2b-256 | bcebc1ee60cad7ffb9dccca9c4e69c1e4c6111379d2fca1096f22a315da701ea |
Close
Hashes for django_comment_migrate-0.0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | abc90a4c949f3c55fe77757b9291c25973dcb403a0fd7bd1069c5a3716ea7202 |
|
MD5 | 87627aabb57619b6dd26808cfd6cbdd3 |
|
BLAKE2b-256 | c5409fa62e6074664978ec77c574fd3e61786184af7c3f54def9a8ffa17f8b50 |