Re: Running into a "Cannot assign... must be a ...instance" error

2020-03-05 Thread Sachin Ranadive
Or ignore the form username field; author=request.user Sachin Ranadive On Thu, Mar 5, 2020, 8:17 PM Sachin Ranadive wrote: > Change view code, assign User object instead. > > author = User.objects.get(username=request.POST["username"]) > > Sachin > > On Thu, Mar

Re: Running into a "Cannot assign... must be a ...instance" error

2020-03-05 Thread Sachin Ranadive
Change view code, assign User object instead. author = User.objects.get(username=request.POST["username"]) Sachin On Thu, Mar 5, 2020, 4:00 AM Joey Jo Jo Jr wrote: > New to Django. > > I'm trying to set up a simple comment form where I can add a title for the > comment, content of the comment,