导包
from django.db import models
定义模型
from django.db import models # 定义用户类 class User(models.Model): name = models.CharField(max_length=32,unique=True) class Meta: db_table = 'user'