Skip to content

Commit ba00e86

Browse files
authored
Update models.py
Add `process_first_name` to test model
1 parent 8524655 commit ba00e86

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/testprofiles/models.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,12 @@ class TestProfile(models.Model):
2323
user = models.OneToOneField('auth.User')
2424
age = models.CharField(max_length=100, blank=True)
2525

26+
def process_first_name(self, first_name):
27+
self.first_name = first_name[0]
2628
else:
2729
from django.contrib.auth.models import AbstractUser
2830
class TestUser(AbstractUser):
2931
age = models.CharField(max_length=100, blank=True)
32+
33+
def process_first_name(self, first_name):
34+
self.first_name = first_name[0]

0 commit comments

Comments
 (0)