Answer the question
In order to leave comments, you need to log in
How to add a user from a custom registration system in Django?
There is a custom user registration system that is not tied to django.contrib.auth.
The user model is on models.Model but does not inherit AbstractUser and BaseUserManage, the logic is all self-written (not by me). How can I now access an authorized user from request to perform standard CRUD operations and differentiate access rights to content?
That is, wherever request.user is usually used, now you need to use something else, I have never encountered this. Does anyone have experience to share?
Answer the question
In order to leave comments, you need to log in
If there is no way to "rewrite humanly" and you are sure that there is "not humanly", then there are three options:
By the way, as a matter of fact for item 1 the same "function" is necessary. It's just that the calling methods are different.
But of course it's better to rewrite it in a normal way. Although business does not always need it (due to 1-2 minor edits, rewrite legacy code).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question