环境
Python 3.7.6
Django 2.2.16
代码
models.py
from django.contrib.auth.models import User
def get_user_full_name(self):
return '{}{}'.format(self.last_name, self.first_name)
Python 3.7.6
Django 2.2.16
models.py
from django.contrib.auth.models import User
def get_user_full_name(self):
return '{}{}'.format(self.last_name, self.first_name)