From 705671c8877237fb0c927244a0435bdbeda5eca9 Mon Sep 17 00:00:00 2001 From: PCoder Date: Sun, 28 Nov 2021 10:35:38 +0530 Subject: [PATCH] Make title / first_name / last_name / full_name Charfields --- app/models.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models.py b/app/models.py index 7043288..a2db0d1 100644 --- a/app/models.py +++ b/app/models.py @@ -534,9 +534,9 @@ class Person(models.Model): ) id = models.AutoField(primary_key=True) source_id = models.IntegerField(blank=True, null=True) - title = models.TextField(blank=True, null=True) - first_name = models.TextField(blank=True, null=True) - last_name = models.TextField(blank=True, null=True) + title = models.CharField(blank=True, null=True, max_length=255) + first_name = models.CharField(blank=True, null=True, max_length=50) + last_name = models.CharField(blank=True, null=True, max_length=50) organisation = models.TextField(blank=True, null=True) position = models.TextField(blank=True, null=True) contact_email = models.EmailField(blank=True, null=True) # email_1 @@ -545,7 +545,7 @@ class Person(models.Model): field_indexer = models.TextField(db_column='_indexer', blank=True, null=True) # Field renamed because it started with '_'. mr_mrs = models.TextField(blank=True, null=True, choices=MR_MRS_CHOICES) - full_name = models.TextField(blank=True, null=True) + full_name = models.CharField(blank=True, null=True, max_length=100) search_name = models.TextField(blank=True, null=True) email_2 = models.EmailField(blank=True, null=True) skype = models.CharField(blank=True, null=True, max_length=50)