TextField
instead of CharField
PTC-W0904CharField
highlighted in the issue has a max_length
> 256.
It is recommended to use TextField
for such long fields. CharField
should only be used for smaller strings.
Reasons to fix this:
max_length
.max_length
needs to be increased, you'd need to create a new database migration to facilitate this change.class MyModel(models.Model):
my_field = models.CharField(max_length=1000)
class MyModel(models.Model):
my_field = models.TextField()