[Django]-TypeError: get() takes 2 positional arguments but 3 were given

4👍

Your get() method implementation is missing an argument.

First check with TemplateView ancestor class
https://docs.djangoproject.com/en/2.0/ref/class-based-views/base/#django.views.generic.base.TemplateView

Zoom in to see the exact get() method implementation
https://docs.djangoproject.com/en/2.0/ref/class-based-views/base/#django.views.generic.base.View

  def get(self, request, *args, **kwargs):
        return HttpResponse('Hello, World!')
👤joe

Leave a comment