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.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | af3ba5674b8b414409fe5574370701044d68357ca04e042151bb2491eb580d0c |
|
MD5 | d2d6b83ae8a291b34cbbcfcd3a386dc9 |
|
BLAKE2b-256 | 15ebea3a97f0084b836fd74c73f68a17371f686ca6e86ef11524be89885f1b85 |
Close
Hashes for django_comment_migrate-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c538809ba4acdfeb3fb543709a62cebf70fe5d896b10a69e6ad838c4aa3d840 |
|
MD5 | cfcad327866a93555f2881c0e98f6c91 |
|
BLAKE2b-256 | 4cac15b36f7be3142d1b568456cc1180da3942d15bc5c7008b6a641280affbc4 |