A
A
Astrohas2017-05-13 07:47:40
Django
Astrohas, 2017-05-13 07:47:40

How to add additional methods for User?

You need to add additional methods (not fields) for the standard User. How to do this so that you can access through the model itself, such as

request.user.method_name() или User.objects.first().method_name()

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Kitaev, 2017-05-13
@Astrohas

Making a custom user when creating a new project is the first task for 95% of projects. And there you can hang as many methods as you want.
If this is no longer possible - monkey patching.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question