1
class ConcerModel(models.Model):
    Name=models.CharField(max_length=100)
    singerName=models.CharField(max_length=100)
    lenght=models.CharField()
    
    def __str__(self):
        return self.singerName


class locationModel (models.Model):
    Name=models.CharField(max_length=100)
    Address=models.CharField(max_length=500)
    phone=models.CharField(max_length=12)
    capacity=models.IntegerField()

    def __str__(self):
        return self.Name

The following error is given during the execution of the makemigrations command

SystemCheckError: System check identified some issues:

ERRORS:

ticketsale.ConcerModel.lenght: (fields.E120) CharFields must define a 'max_length' attribute.

1 Answers1

1

You have a field lenght (which is supposed to be length I guess) without a max_length. Define that and you are good to go.

haduki
  • 1,145
  • 5
  • 23