A
A
Astrohas2017-01-30 06:37:37
Django
Astrohas, 2017-01-30 06:37:37

How to change display of User in Select'ah?

On the page for editing an object, there is a Select to select a user. Select values ​​are usernames of users. Is it possible to change the value to Say for example Last Name and First Name ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
German Jet, 2017-01-30
@GeraJet

In the model

def __str__(self):
    return '%s %s' % (self.first_name, self.last_name)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question