How can I get information about the logged-in user in a Django application?
What I want to do is get the user information from Logged-in user and put additional information and store in a database(models.py). So in views.py:
def registerView(request):
if request.method == "POST":
form = UserCreationForm(request.POST)
if form.is_valid():
form.save()
return redirect('login_url')
else:
form = UserCreationForm()
return render(request, 'main/register.html',{'form':form})
here how do I grab the users information