I have abstract user model. I am using this queryset for getting current logged in user username.
currentuser_username = UserManagement.objects.filter(username=request.user)
my terminal result:
I am not understanding how to write queryset for get current user email. If I don’t know the username of current user then I can write this queryset currentuser_username = UserManagement.objects.filter(username=request.user)
and it will give me the username of current user. How to apply same method for getting mail for current user???
here my models.py
class UserManagement(AbstractUser):
is_blog_author = models.BooleanField(default=False)
is_editor = models.BooleanField(default=False)
is_subscriber = models.BooleanField(default=False)
is_customer = models.BooleanField(default=False)