-3

I m trying to get the email of the person who just login.

if request.method == "POST":

    username = request.POST.get('username')

    password = request.POST.get('password')

    email = request.POST.get('email')
  • 3
    Welcome to SO. Please clarify what your question is. What errors are you encountering? – ewokx May 11 '21 at 09:32

1 Answers1

0

if you want to get the emai of the logged in user than: in views.py file:

user_email = request.user.email 

in template file:

{{ request.user.email }}   
Iqbal Hussain
  • 1,077
  • 1
  • 4
  • 12