无法在 Django 中进行迁移

时间:2021-02-21 07:56:33

标签: python django django-models

我有一个模型类,其中有 4 个字段。当我尝试进行迁移时,它说:

No changes detected

以下是我的模型文件:

models.py

from django.db import models

# Create your models here.

class CarDetail(models.Model):
   modelname = models.CharField(max_length=20)
   modelimg = models.ImageField(upload_to = 'allcars/')
   modelcolor = models.CharField(max_length=11)
   modelage = models.IntegerField()

如何将字段迁移到数据库?

0 个答案:

没有答案
相关问题