[Answered ]-Save a form using django's authentication framework?

2👍

You’ve using save with commit=False so you’re almost there. You can get the logged in user from the request object.

if form.is_valid(): 
    review = form.save(commit=False) 
    review.product = p 
    review.user = request. user 
    review.save()

For more details, see the Django docs for user authentication.

Leave a comment