<filename>django/diary/forms.py<gh_stars>1-10
from django.forms import ModelForm
from diary.models import Content, User, Result

class ContentForm(ModelForm):
    class Meta:
        model = Content
        fields = ['text']

class UserForm(ModelForm):
    class Meta:
        model = User
        fields = ['id', 'name', 'count', 'email']
        
class ResultForm(ModelForm):
    class Meta:
        model = Result
        fields = ['id', 'happiness', 'sadness', 'anger', 'fear', 'email']

<filename>django/diary/forms.py<gh_stars>1-10
from django.forms import ModelForm
from diary.models import Content, User, Result

class ContentForm(ModelForm):
    class Meta:
        model = Content
        fields = ['text']

class UserForm(ModelForm):
    class Meta:
        model = User
        fields = ['id', 'name', 'count', 'email']
        
class ResultForm(ModelForm):
    class Meta:
        model = Result
        fields = ['id', 'happiness', 'sadness', 'anger', 'fear', 'email']
