[Answer]-Author = models.ForeignKey('auth.User', null=True, blank=False) trouble

1👍

I updated my answere, i misenderstood your question.

Change this in your view

    if form.is_valid():
        # Creating the object without commiting to database
        obj = form.save(commit=False)
        # Setting the user from request
        obj.author = request.user
        # Commiting to the database
        obj.save()

Leave a comment