TypeError: 'NoneType' object is not subscriptable followed by AttributeError: 'NoneType' object has no attribute 'split'
问题 Using django. I have the following model: class Postagem(models.Model): id = models.AutoField(primary_key=True, editable=False) descricao = models.CharField(max_length=50) area = models.ForeignKey('core.Area', null=True) user = models.ForeignKey('User') categoria = models.CharField(max_length=50, null=True) post = models.FileField(upload_to='posts/', null=True) thumbnail = models.FileField(upload_to='posts/', null=True) def __str__(self): return self.descricao The Following form: class