title: django.core.exceptions.ImproperlyConfigured: Creating a ModelForm without either the 'fields' attribute or the 'exclude' attribute is prohibited
body: <pre><code>(ll_env) brads-MacBook-Pro:learning_log $ python manage.py runserver
      Performing system checks...
      
  Unhandled exception in thread started by &lt;function check_errors.&lt;locals&gt;.wrapper at 0x10d417d08&gt;
      Traceback (most recent call last):
        File &quot;/learning_log/ll_env/lib/python3.6/site-packages/django/utils/autoreload.py&quot;, line 225, in wrapper
          fn(*args, **kwargs)
        File &quot;/learning_log/ll_env/lib/python3.6/site-packages/django/core/management/commands/runserver.py&quot;, line 117, in inner_run
          self.check(display_num_errors=True)
        File &quot;/learning_log/ll_env/lib/python3.6/site-packages/django/core/management/base.py&quot;, line 379, in check
          include_deployment_checks=include_deployment_checks,
        File &quot;/learning_log/ll_env/lib/python3.6/site-packages/django/core/management/base.py&quot;, line 366, in _run_checks
          return checks.run_checks(**kwargs)
        File &quot;/learning_log/ll_env/lib/python3.6/site-packages/django/core/checks/registry.py&quot;, line 71, in run_checks
          new_errors = check(app_configs=app_configs)
        File &quot;/learning_log/ll_env/lib/python3.6/site-packages/django/core/checks/urls.py&quot;, line 13, in check_url_config
          return check_resolver(resolver)
        File &quot;/learning_log/ll_env/lib/python3.6/site-packages/django/core/checks/urls.py&quot;, line 23, in check_resolver
          return check_method()
        File &quot;/learning_log/ll_env/lib/python3.6/site-packages/django/urls/resolvers.py&quot;, line 396, in check
          for pattern in self.url_patterns:
        File &quot;/learning_log/ll_env/lib/python3.6/site-packages/django/utils/functional.py&quot;, line 37, in __get__
          res = instance.__dict__[self.name] = self.func(instance)
        File &quot;/learning_log/ll_env/lib/python3.6/site-packages/django/urls/resolvers.py&quot;, line 533, in url_patterns
          patterns = getattr(self.urlconf_module, &quot;urlpatterns&quot;, self.urlconf_module)
        File &quot;/learning_log/ll_env/lib/python3.6/site-packages/django/utils/functional.py&quot;, line 37, in __get__
          res = instance.__dict__[self.name] = self.func(instance)
        File &quot;/learning_log/ll_env/lib/python3.6/site-packages/django/urls/resolvers.py&quot;, line 526, in urlconf_module
          return import_module(self.urlconf_name)
        File &quot;/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/__init__.py&quot;, line 126, in import_module
          return _bootstrap._gcd_import(name[level:], package, level)
        File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 978, in _gcd_import
        File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 961, in _find_and_load
        File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 950, in _find_and_load_unlocked
        File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 655, in _load_unlocked
        File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 678, in exec_module
        File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 205, in _call_with_frames_removed
        File &quot;/learning_log/learning_log/urls.py&quot;, line 23, in &lt;module&gt;
          url(r'',include('learning_logs.urls',namespace='learning_logs')),
        File &quot;/learning_log/ll_env/lib/python3.6/site-packages/django/urls/conf.py&quot;, line 34, in include
          urlconf_module = import_module(urlconf_module)
        File &quot;/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/__init__.py&quot;, line 126, in import_module
          return _bootstrap._gcd_import(name[level:], package, level)
        File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 978, in _gcd_import
        File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 961, in _find_and_load
        File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 950, in _find_and_load_unlocked
        File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 655, in _load_unlocked
        File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 678, in exec_module
        File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 205, in _call_with_frames_removed
        File &quot;/learning_log/learning_logs/urls.py&quot;, line 2, in &lt;module&gt;
          from . import views
        File &quot;/learning_log/learning_logs/views.py&quot;, line 6, in &lt;module&gt;
          from .forms import TopicForm
        File &quot;/learning_log/learning_logs/forms.py&quot;, line 4, in &lt;module&gt;
          class TopicForm(forms.ModelForm):
        File &quot;/learning_log/ll_env/lib/python3.6/site-packages/django/forms/models.py&quot;, line 243, in __new__
          &quot;needs updating.&quot; % name
      django.core.exceptions.ImproperlyConfigured: Creating a ModelForm without either the 'fields' attribute or the 'exclude' attribute is prohibited; form TopicForm needs updating.
  
  
  
  
   
  </code></pre>
  <p><strong>some part of the code</strong>:</p>
  <p><strong>manage.py</strong></p>
  <pre><code>#!/usr/bin/env python
  import os
  import sys
  
  if __name__ == '__main__':
      os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'learning_log.settings')
      try:
          from django.core.management import execute_from_command_line
      except ImportError as exc:
          raise ImportError(
              &quot;Couldn't import Django. Are you sure it's installed and &quot;
              &quot;available on your PYTHONPATH environment variable? Did you &quot;
              &quot;forget to activate a virtual environment?&quot;
          ) from exc
      execute_from_command_line(sys.argv)
  </code></pre>
  <p><strong>views.py</strong></p>
  <pre><code>from django.shortcuts import render
  from .models import Topic
  from django.http import HttpResponseRedirect
  #from django.core.urlresolvers import reverse
  from django.urls import reverse
  from .forms import TopicForm
      
  # Create your views here.
  def index(request):
      return render(request,'learning_logs/index.html')
  
  def topics(request):
      topics=Topic.objects.order_by('date_added')
      context={'topics':topics}
      return render(request,'learning_logs/topics.html',context)
      
  def topic(request,topic_id):
      topic=Topic.objects.get(id=topic_id)
      entries=topic.entry_set.order_by('-date_added')
      context={'topic':topic,'entries':entries}
      return render(request,'learning_logs/topic.html',context)
      
  def new_topic(request): 
      if request.method != 'POST': 
          form = TopicForm()
      else: 
          form = TopicForm(request.POST)
          if form.is_valid():
              form.save()
              return HttpResponseRedirect(reverse('learning_logs:topics'))
      
      context = {'form',form}
      return render(request,'learning_logs/new_topic.html',context)
  </code></pre>
  <p>So, I'ver been learning Python using the book <em>Python Crash Course: A hands-on, Project-Based Introduction to Programming</em>. And when I 'runserver', it just showed the above error. I don't know what was wrong, because I did exactly what the book says. Can anybody help me out?</p>
  <p>what happened when I try the above steps.</p>
  <p>Any ideas?</p>