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
PostgreSQL
Microsoft SQL Server
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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6dae8dee1888737d8591f64be84becdbe7c0c2a9be549fbc705c6b25373953af |
|
MD5 | 071eeda623ad0b88151f4425e0a740e2 |
|
BLAKE2b-256 | 5237853369430ac6751428ec558bef77d176734d7f9887ada7210723098fa54a |
Close
Hashes for django_comment_migrate-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 749ce0ddbf30555fe9e43e4f8181b5bf46d1e01850528c36f39c0980069a4b9b |
|
MD5 | 0f07d9991d2d1b0f45bbd20e8a3c266a |
|
BLAKE2b-256 | 776194f02ece055f9c5f2721a2a65f327920c0eea642a89d46c3abe575b198e7 |