title: Django 2.1.3 Error: __init__() takes 1 positional argument but 2 were given
body: <p>I am trying to develop a website with Django 2.1.3 and python 3.7.1
  When I go to the homepage I get this error:</p>
  <pre><code>TypeError at / __init__() takes 1 positional argument but 2 were given
  </code></pre>
  <p>Here are some details about the code I write:</p>
  <p>Traceback</p>
  <pre><code>    Environment:
  
  
      Request Method: GET
      Request URL: http://127.0.0.1:8000/
      
      Django Version: 2.1.3
      Python Version: 3.7.1
      Installed Applications:
      ['django.contrib.admin',
       'django.contrib.auth',
       'django.contrib.contenttypes',
       'django.contrib.sessions',
       'django.contrib.messages',
       'django.contrib.staticfiles',
       'core',
       'crispy_forms']
      Installed Middleware:
      ['django.middleware.security.SecurityMiddleware',
       'django.contrib.sessions.middleware.SessionMiddleware',
       'django.middleware.common.CommonMiddleware',
       'django.middleware.csrf.CsrfViewMiddleware',
       'django.contrib.auth.middleware.AuthenticationMiddleware',
       'django.contrib.messages.middleware.MessageMiddleware',
       'django.middleware.clickjacking.XFrameOptionsMiddleware']
      
      
      
      Traceback:
      
      File &quot;C:\Users\andre\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\handlers\exception.py&quot; in inner
        34.             response = get_response(request)
      
      File &quot;C:\Users\andre\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\handlers\base.py&quot; in _get_response
        126.                 response = self.process_exception_by_middleware(e, request)
      
      File &quot;C:\Users\andre\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\handlers\base.py&quot; in _get_response
        124.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)
      
      File &quot;C:\Users\andre\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\contrib\auth\decorators.py&quot; in _wrapped_view
        21.                 return view_func(request, *args, **kwargs)
      
      Exception Type: TypeError at /
      Exception Value: __init__() takes 1 positional argument but 2 were given
  </code></pre>
  <p>core/models.py</p>
  <p>This is just one table on DB:</p>
  <pre><code>from django.db import models
  
  
  class Evento(models.Model):
      titolo_evento = models.CharField(max_length=30)
      data_inizio = models.DateTimeField()
      data_fine = models.DateTimeField()
  
      def __str__(self):
          return self.titolo_evento
  
      class Meta:
          verbose_name = 'Evento'
          verbose_name_plural = 'Eventi'
  </code></pre>
  <p>core/views.py</p>
  <p>Here I want to see the DB &quot;Eventi&quot; on the homepage only if the user is authenticated, i think the mistake is here, but i don't know where:</p>
  <pre><code>from django.contrib.auth.decorators import login_required
  from .models import Evento
  from django.views.generic.list import ListView
  
  
  @login_required
  class HomeView(ListView):
      queryset = Evento.objects.all()
      template_name = 'core/homepage.html'
      context_object_name = 'lista_eventi'
  </code></pre>
  <p>core/urls.py</p>
  <pre><code>from django.urls import path
  from . import views
  
  
  urlpatterns = [
      path('', views.HomeView, name='homepage'),
      ]
  </code></pre>
  <p>urls.py(project)</p>
  <pre><code>  from django.contrib import admin
      from django.urls import path, include
      
      urlpatterns = [
          path('admin/', admin.site.urls),
          path('', include('core.urls')),
          path('accounts/', include('django.contrib.auth.urls'))
      ]
  </code></pre>