1 2 3 4 5 6 7 8 9 |
[root@site main]# vi models.py from django.db import models # Create your models here. class admin(models.Model): username = models.CharField(max_length=11) password = models.CharField(max_length=11) class Meta: db_table = 'admin' |
以class Meta声明即可。
2018-02-28 15:41:55