I'm quite new to Django. I'm trying to get user profile with the help of request.user.get_profile()
but there is a warning that the use of AUTH_PROFILE_MODULE
has been deprecated.
I have a line in my settings.py: AUTH_PROFILE_MODULE = "log_viewer.Configs"
where Configs
is a model with fields to keep user profile settings.
What is the new approach of doing this?
At first,I create a 'profile' for User:
User.profile = property(lambda u: Configs.objects.get_or_create(user=u)[0])
and use this to get the profile:
request.user.profile
more detail here: https://code.djangoproject.com/ticket/15937
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With