from .models import BlogPost, Comment
from django.forms import ModelForm

class BlogPostForm(ModelForm):
    class Meta:
        model = BlogPost
        exclude = ('user',)

class CommentForm(ModelForm):
    class Meta:
        model = Comment
        exclude = ('post',)

from .models import BlogPost, Comment
from django.forms import ModelForm

class BlogPostForm(ModelForm):
    class Meta:
        model = BlogPost
        exclude = ('user',)

class CommentForm(ModelForm):
    class Meta:
        model = Comment
        exclude = ('post', 'user', 'date',)

Exclude fields from CommentForm that will be automatically inserted
Exclude fields from CommentForm that will be automatically inserted
