S
S
sazhyk2016-11-24 20:00:08
Django
sazhyk, 2016-11-24 20:00:08

What is the correct way to create additional model methods in Django?

The django.contrib.auth.model.User model has a get_full_name() method. It returns first_name + last_name. I need a slightly different option. I want vaz to rotate first_name + the first capital letter of last_name. How to implement it correctly?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Egor Kazantsev, 2017-03-18
@saintbyte

If you want a custom user, then it should have been done from the very beginning and it is even written in the docks, now I recommend just making a templatestag

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question