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
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.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d423151f557f1b6312c82a6b4fdee926db99c8d878e42b43417557dd90d42b90 |
|
MD5 | e70db9896dbc3b7c3be47d2c751bccdd |
|
BLAKE2b-256 | 9ebf0a255bdbf82e40d026856147e4d05400e3cecac3b1c1f9b264b6b4edb786 |
Close
Hashes for django_comment_migrate-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 681ed441c14d6103cf6775cb39aec98eaf3bb850527f0243dd05c9ffe9efb02f |
|
MD5 | e619cf6157938a0e666f4e437ca613b2 |
|
BLAKE2b-256 | 7e5b36f2dc81e3b43631d71e6fe501a171d6836d298f082c5899ae68931d8d9a |