title: Django is not adding class Question with forms
body: <p>I have created an app called <code>/f/ask/</code> and on that page, I am adding class Question in the form, but I don't know why it's not adding that class to my database. Here are my files.</p>
  <p><strong>ask.html</strong></p>
  <pre><code>    &lt;!DOCTYPE html&gt;
  {% load static %}
  &lt;html lang=&quot;en&quot;&gt;
      &lt;head&gt;
          &lt;meta charset=&quot;UTF-8&quot;&gt;
          &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
          &lt;link rel=&quot;stylesheet&quot; href=&quot;{% static 'f/ask/ask.css' %}&quot;&gt;
          &lt;title&gt;BareTalk&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;div id=&quot;wrapper&quot;&gt; 
              &lt;form method=&quot;post&quot;&gt;
                  {% csrf_token %}
                  {{ form }}
  
                  &lt;!-- TODO: input submit Reg() function javascript --&gt;
                  &lt;input name=&quot;final&quot; id=&quot;final&quot; type=&quot;submit&quot; value=&quot;Ask&quot;&gt;
              &lt;/form&gt;
          &lt;/div&gt;
      &lt;/body&gt;
      &lt;script src=&quot;{% static 'f/ask/ask.js' %}&quot;&gt;&lt;/script&gt;
  &lt;/html&gt;
  </code></pre>
  <p><strong>views.py</strong></p>
  <pre><code>from django.views.generic.edit import CreateView
  from django.shortcuts import render
  from .forms import QuestionForm
  from .models import *
  
  def QuestionView(request):
      ''' List of Questions '''
      questions = Question.objects.all()
      return render(request, 'f/index.html', {'question_list': questions})
  
  def QuestionCurrent(request, pk):
      ''' Current Question '''
      question = Question.objects.get(id=pk)
      return render(request, 'f/current.html', {'question': question})
  
  def ask(request):
      form = QuestionForm()
      if request.method == 'POST':
          form = QuestionForm(request.POST)
          if form.is_valid():
              form.save(commit=False)
  
      content = {'form': form}
  
      return render(request, 'f/ask.html', content)
  </code></pre>
  <p><strong>urls.py</strong></p>
  <pre><code>from django.urls import path, register_converter
  from . import views, converter
  
  register_converter(converter.HexConverter, 'hex')
  
  urlpatterns = [
      path('', views.QuestionView, 'f'),
      path('ask/', views.ask, name='ask'),
      path('&lt;hex:pk&gt;/', views.QuestionCurrent, name='question_current'),
  ]
  </code></pre>
  <p><strong>forms.py</strong></p>
  <pre><code>from django.forms import ModelForm
  from .models import *
  
  class QuestionForm(ModelForm):
      class Meta:
          model = Question
          fields = '__all__'
  </code></pre>
  <p><strong>models.py</strong></p>
  <pre><code>from django.db import models
  
  # ---------- Question ----------
  
  class Question(models.Model):
      ''' Questions '''
  
      author     = models.CharField('Author', max_length=45)
      title      = models.CharField('Title', max_length=300)
      body       = models.TextField('Body')
      date       = models.DateTimeField(auto_now_add=True, db_index=True)
  
      def __str__(self):
          return self.title
  
      class Meta:
          verbose_name_plural = 'Questions'
          verbose_name        = 'Question'
  
  # ---------- Answer ----------
  
  class Answer(models.Model):
      ''' Answers '''
  
      author   = models.CharField('Author', max_length=45)
      title    = models.CharField('Title', max_length=300)
      body     = models.TextField('Body')
      date     = models.DateTimeField(auto_now_add=True, db_index=True)
      question   = models.ForeignKey(Question, on_delete=models.CASCADE)
      rating   = models.IntegerField()
      isAnswer = models.BooleanField()
  
      def __str__(self):
          return self.title
      
      class Meta:
          verbose_name_plural = 'Answers'
          verbose_name        = 'Answer'
  </code></pre>