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.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5425d7fdf7721576bdf13cd750bd843743786372fa844853c906fe697335a828 |
|
MD5 | 80b8cfd396c02e2f09be8bb58eec1a1f |
|
BLAKE2b-256 | 9f5d116410175802adc3824cca9754a8c0b14ba75b2ef41d8d059bac9d3db8da |
Close
Hashes for django_comment_migrate-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9c1be9383ef20bef5c734de06ba12f2b6807b2d2f2e3820c2739b9939da2e7a |
|
MD5 | 1e7f755e038ac1e9e91f11e3238d2aba |
|
BLAKE2b-256 | f96bcaa8a161a1734dff37b68fe1137bfedb78fbf8c6d9e804f4262840662e3c |