from django import forms
from .models import Tutorial


class TutorialForm(forms.ModelForm):
    # ToDO: Set required fields??

    class Meta:
        model = Tutorial
        fields = ('title', 'html', 'markdown')
from django import forms
from .models import Tutorial


class TutorialForm(forms.ModelForm):
    # ToDO: Set required fields??

    class Meta:
        model = Tutorial
        fields = ('category', 'title', 'markdown', 'level')

Add new model fields to form
Add new model fields to form

  from django import forms
  from .models import Tutorial
  
  
  class TutorialForm(forms.ModelForm):
      # ToDO: Set required fields??
  
      class Meta:
          model = Tutorial
-         fields = ('title', 'html', 'markdown')
+         fields = ('category', 'title', 'markdown', 'level')
+ 
Add new model fields to form
## Code Before:
from django import forms
from .models import Tutorial


class TutorialForm(forms.ModelForm):
    # ToDO: Set required fields??

    class Meta:
        model = Tutorial
        fields = ('title', 'html', 'markdown')
## Instruction:
Add new model fields to form
## Code After:
from django import forms
from .models import Tutorial


class TutorialForm(forms.ModelForm):
    # ToDO: Set required fields??

    class Meta:
        model = Tutorial
        fields = ('category', 'title', 'markdown', 'level')
