An authorized user leaves a comment on the page. How do I implement the got_comment(request) view got_comment(request) There is a model:
class Comment(models.Model): comment_nickname = models.ForeignKey(Stranger, on_delete=models.CASCADE, related_name='+') comment_text = models.CharField(max_length=1000) The key to the user authentication session is request.session ['stranger_id']. I thought to implement something like this:
def got_comment(request): c = Comment(comment_text=request.POST['comment_text'], comment_nickname="""""") But I do not know what to write at the end of the line.