From 9eca8179ea1fc57d5056607dc380cb0d235da351 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Sat, 20 Jul 2024 19:24:35 +0000 Subject: [PATCH] refactor: convert `TextField` to `CharField` `CharField` 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. --- functionality/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functionality/models.py b/functionality/models.py index 4420bb3..179da31 100644 --- a/functionality/models.py +++ b/functionality/models.py @@ -10,7 +10,7 @@ class Book(models.Model): publisher = models.CharField(max_length=100) authors = models.CharField(max_length=100) thumbnail = models.CharField(max_length=100) - description = models.CharField(max_length=500) + description = models.TextField() rating = models.IntegerField(null=True) started_reading = models.DateField(max_length=100) ended_reading = models.DateField(max_length=100, null=True)