Q:

django model field comment in database

this is the model class(django version 2.0)
class Host(models.Model):
    host_id=models.CharField(max_length=20,primary_key=True)
    host_label=models.CharField(verbose_name="linux_host_label",max_length=255)

the table structrue in database
mysql> show create table dashboard_host;
| dashboard_host | CREATE TABLE `dashboard_host` (
  `host_id` varchar(20) NOT NULL,
  `host_label` varchar(255) NOT NULL,
  PRIMARY KEY (`host_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 |

but how to do in the model class to get like this
mysql> show create table dashboard_host;
| dashboard_host | CREATE TABLE `dashboard_host` (
  `host_id` varchar(20) NOT NULL COMMENT '主机id',
  `host_label` varchar(255) NOT NULL COMMENT '主机标签',
  PRIMARY KEY (`host_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 |
+----------------+-----------------------------------

A:

well there is no such way in django from the model directly. you can check the ticket https://code.djangoproject.com/ticket/24638
but you can do one thing, 
first makemigrations your app and then edit the migration file and place 
  CREATE TABLE `dashboard_host` (
  `host_id` varchar(20) NOT NULL COMMENT '主机id',
  `host_label` varchar(255) NOT NULL COMMENT '主机标签',
  PRIMARY KEY (`host_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4

inplace of the sql query automatically generated by django
and then migrate

